1
0
Fork 0
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:
Sean Hill 2011-08-28 16:29:06 -05:00
parent 179cb2c88a
commit 99d539b9a7

View file

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