Parent

Files

Class/Module Index [+]

Quicksearch

ActiveRecord::Generators::DeviseGenerator

Public Instance Methods

copy_devise_migration() click to toggle source
# File lib/generators/active_record/devise_generator.rb, line 13
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}"
  else
    migration_template "migration.rb", "db/migrate/devise_create_#{table_name}"
  end
end
generate_model() click to toggle source
# File lib/generators/active_record/devise_generator.rb, line 21
def generate_model
  invoke "active_record:model", [name], :migration => false unless model_exists? && behavior == :invoke
end
inject_devise_content() click to toggle source
# File lib/generators/active_record/devise_generator.rb, line 25
def inject_devise_content
  inject_into_class(model_path, class_name, model_contents +   # Setup accessible (or protected) attributes for your model  attr_accessible :email, :password, :password_confirmation, :remember_me) if model_exists?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.