Class: AuthAssist::RoleMigrations::AdminField

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

Instance Attribute Summary

Attributes inherited from Base

#generator

Instance Method Summary collapse

Methods inherited from Base

#generate_reverse_migration, #initialize, #setup

Methods included from MigrationHelper

#copy_migration, #file_reverse, #find_migration, included, #migration, #migration_dir, #migration_exists?, #reverse_migration, #reverse_migration_methods

Methods included from MigrationHelper::CodeRefactor

#clear_user_relations, #erase_in_user, #has_role_assignments, #has_roles, #has_roles_through_assignments, #insert_user_relation, #remove_user_relation, #role_assignment_file_content, #role_file_content, #write_model_file

Constructor Details

This class inherits a constructor from AuthAssist::RoleMigrations::Base

Instance Method Details

#migration_namesObject



65
66
67
# File 'lib/generators/role_migrations.rb', line 65

def migration_names
  ['add_admin_field_to_user']
end

#run_migrationObject



69
70
71
# File 'lib/generators/role_migrations.rb', line 69

def run_migration
  migration "#{admin_field_migration_name} admin:boolean"
end