Class: FionaGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- FionaGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/fiona/fiona_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
5 6 7 |
# File 'lib/generators/fiona/fiona_generator.rb', line 5 def self.next_migration_number(path) Time.now.utc.strftime('%Y%m%d%H%M%S') end |
Instance Method Details
#create_initializer ⇒ Object
13 14 15 |
# File 'lib/generators/fiona/fiona_generator.rb', line 13 def create_initializer copy_file 'settings_initializer.rb', 'config/initializers/settings.rb' end |
#create_migration ⇒ Object
9 10 11 |
# File 'lib/generators/fiona/fiona_generator.rb', line 9 def create_migration migration_template 'create_fiona_tables.rb', 'db/migrate/create_fiona_tables.rb' end |
#create_templates ⇒ Object
17 18 19 |
# File 'lib/generators/fiona/fiona_generator.rb', line 17 def create_templates copy_file 'settings_template.rb', 'app/templates/settings_template.rb' end |