Class: EngineRoom::Generators::SetupGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- EngineRoom::Generators::SetupGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/engine_room/setup_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
16 17 18 |
# File 'lib/generators/engine_room/setup_generator.rb', line 16 def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number(dirname) end |
.source_root ⇒ Object
8 9 10 |
# File 'lib/generators/engine_room/setup_generator.rb', line 8 def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end |
Instance Method Details
#devise ⇒ Object
20 21 22 |
# File 'lib/generators/engine_room/setup_generator.rb', line 20 def devise migration_template "001_devise_create_users.rb", "db/migrate/devise_create_users.rb" end |
#doit ⇒ Object
12 13 14 |
# File 'lib/generators/engine_room/setup_generator.rb', line 12 def doit puts "generating setup..." end |
#setup ⇒ Object
24 25 26 27 |
# File 'lib/generators/engine_room/setup_generator.rb', line 24 def setup migration_template "002_create_sections.rb", "db/migrate/create_sections.rb" migration_template "003_create_fields.rb", "db/migrate/create_fields.rb" end |