Class: Olympic::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Olympic::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/olympic/install/install_generator.rb
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration. This is literally documented nowhere. Wtf.
11 12 13 14 |
# File 'lib/generators/olympic/install/install_generator.rb', line 11 def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#generate_migration ⇒ Object
16 17 18 |
# File 'lib/generators/olympic/install/install_generator.rb', line 16 def generate_migration migration_template "create_olympic_tables.rb", "db/migrate/create_olympic_tables.rb" end |