Class: ActiveRecord::Generators::InstallGenerator
- Inherits:
-
Base
- Object
- Base
- ActiveRecord::Generators::InstallGenerator
- Defined in:
- lib/generators/active_record/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_global_roles_migration ⇒ Object
9 10 11 |
# File 'lib/generators/active_record/install_generator.rb', line 9 def copy_global_roles_migration migration_template "migration.rb", "db/migrate/add_global_role_to_#{table_name}" end |
#default_value ⇒ Object
17 18 19 |
# File 'lib/generators/active_record/install_generator.rb', line 17 def default_value args.first == -1 ? 0 : args.first end |
#model_path ⇒ Object
13 14 15 |
# File 'lib/generators/active_record/install_generator.rb', line 13 def model_path File.join("app", "models", "#{file_path}.rb") end |