rails-generators

How to override Rails' default migration generator template

徘徊边缘 提交于 2020-01-02 08:22:30
问题 I need to override these migration templates: https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb and https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activerecord/lib/rails/generators/active_record/migration/templates/create_table_migration.rb inside my rails application so that they pick up the template from rails application instead of the gem itself. I've

How to override Rails' default migration generator template

。_饼干妹妹 提交于 2020-01-02 08:22:17
问题 I need to override these migration templates: https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb and https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activerecord/lib/rails/generators/active_record/migration/templates/create_table_migration.rb inside my rails application so that they pick up the template from rails application instead of the gem itself. I've

How to override Rails' default migration generator template

夙愿已清 提交于 2019-12-06 09:53:37
I need to override these migration templates: https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb and https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activerecord/lib/rails/generators/active_record/migration/templates/create_table_migration.rb inside my rails application so that they pick up the template from rails application instead of the gem itself. I've tried all possible combinations so far but no luck. What I've tried: - Rails.root/lib/templates/rails