Method: ActiveRecord::Generators::TollGenerator#copy_toll_migration
- Defined in:
- lib/generators/active_record/toll_generator.rb
#copy_toll_migration ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/generators/active_record/toll_generator.rb', line 13 def copy_toll_migration if (behavior == :invoke && model_exists?) || (behavior == :revoke && migration_exists?(table_name)) migration_template "existing_migration.rb", "db/migrate/add_toll_to_#{table_name}.rb" else migration_template "migration.rb", "db/migrate/toll_create_#{table_name}.rb" end end |