Ensure that migrations are created with the `.rb` extension.
Since rails/rails#13612 the generator won't always add the `.rb` extension when creating migrations with the `migration_template` method.
This commit is contained in:
parent
2aedb1bf79
commit
e57b672e90
|
@ -11,9 +11,9 @@ module ActiveRecord
|
|||
|
||||
def copy_devise_migration
|
||||
if (behavior == :invoke && model_exists?) || (behavior == :revoke && migration_exists?(table_name))
|
||||
migration_template "migration_existing.rb", "db/migrate/add_devise_to_#{table_name}"
|
||||
migration_template "migration_existing.rb", "db/migrate/add_devise_to_#{table_name}.rb"
|
||||
else
|
||||
migration_template "migration.rb", "db/migrate/devise_create_#{table_name}"
|
||||
migration_template "migration.rb", "db/migrate/devise_create_#{table_name}.rb"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue