Class: ActiveRecord::Generators::EasyRolesGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/active_record/easy_roles_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_easy_roles_migrationObject



16
17
18
19
20
21
22
# File 'lib/generators/active_record/easy_roles_generator.rb', line 16

def copy_easy_roles_migration
  if options.use_bitmask_method
    migration_template "migration_bitmask.rb", "db/migrate/add_bitmask_roles_to_#{table_name}"
  else
    migration_template "migration_non_bitmask.rb", "db/migrate/add_easy_roles_to_#{table_name}"
  end
end