Class: CustomTableGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- CustomTableGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/custom_table/custom_table_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_initializer_file ⇒ Object
8 9 10 |
# File 'lib/generators/custom_table/custom_table_generator.rb', line 8 def copy_initializer_file copy_file "initializer.rb", "config/initializers/custom_table.rb" end |
#copy_migration_file ⇒ Object
12 13 14 |
# File 'lib/generators/custom_table/custom_table_generator.rb', line 12 def copy_migration_file migration_template "migration.rb", "db/migrate/add_custom_table_to_users.rb" end |