mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Chagned the copy_devise_migration method to properly handle the :revoke behavior using @daf's commit: acf7e9e2ad
as a guide.
This commit is contained in:
parent
179cb2c88a
commit
99d539b9a7
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,9 @@ module ActiveRecord
|
|||
source_root File.expand_path("../templates", __FILE__)
|
||||
|
||||
def copy_devise_migration
|
||||
unless model_exists?
|
||||
exists = model_exists?
|
||||
exists = !exists if behavior == :revoke
|
||||
unless exists
|
||||
migration_template "migration.rb", "db/migrate/devise_create_#{table_name}"
|
||||
else
|
||||
migration_template "migration_existing.rb", "db/migrate/add_devise_to_#{table_name}"
|
||||
|
|
Loading…
Reference in a new issue