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:
Lucas Mazza 2014-02-11 10:19:05 -02:00
parent 2aedb1bf79
commit e57b672e90
1 changed files with 2 additions and 2 deletions

View File

@ -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