Class: I18n::ActiveRecord::Generators::InstallGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- I18n::ActiveRecord::Generators::InstallGenerator
- Defined in:
- lib/generators/i18n/active_record/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_initializer ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/i18n/active_record/install_generator.rb', line 17 def copy_initializer tpl = "#{[:simple] ? 'simple' : 'advanced'}_initializer.rb.erb" template tpl, 'config/initializers/i18n_active_record.rb' end |
#create_migrations ⇒ Object
23 24 25 |
# File 'lib/generators/i18n/active_record/install_generator.rb', line 23 def create_migrations migration_template 'migration.rb.erb', "db/migrate/create_#{table_name}.rb" end |