Class: EffectiveWorkExperience::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- EffectiveWorkExperience::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/effective_work_experience/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
10 11 12 |
# File 'lib/generators/effective_work_experience/install_generator.rb', line 10 def self.next_migration_number(dirname) ActiveRecord::Migration.next_migration_number(current_migration_number(dirname) + 1) end |
Instance Method Details
#copy_initializer ⇒ Object
14 15 16 |
# File 'lib/generators/effective_work_experience/install_generator.rb', line 14 def copy_initializer template ('../' * 3) + 'config/effective_work_experience.rb', 'config/initializers/effective_work_experience.rb' end |
#create_migration_file ⇒ Object
18 19 20 |
# File 'lib/generators/effective_work_experience/install_generator.rb', line 18 def create_migration_file migration_template ('../' * 3) + 'db/migrate/101_create_effective_work_experience.rb', 'db/migrate/create_effective_work_experience.rb' end |