Class: FlexiModel::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- FlexiModel::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/flexi_model/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.
8 9 10 11 |
# File 'lib/generators/flexi_model/install/install_generator.rb', line 8 def self.next_migration_number(dirname) #:nodoc: next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#generate_install ⇒ Object
13 14 15 16 17 |
# File 'lib/generators/flexi_model/install/install_generator.rb', line 13 def generate_install Dir.glob(File.join(File.dirname(__FILE__), 'templates/*.rb')).each do |file| migration_template file, "db/migrate/#{file.split('/').last}" end end |