Class: ConsistencyCheck::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ConsistencyCheck::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/consistency_check/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
12 13 14 15 |
# File 'lib/generators/consistency_check/install/install_generator.rb', line 12 def self.next_migration_number(path) next_migration_number = current_migration_number(path) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#create_job ⇒ Object
26 27 28 29 |
# File 'lib/generators/consistency_check/install/install_generator.rb', line 26 def create_job fname = 'app/jobs/consistency_check/definitions.rb' template('jobs/consistency_check/definitions.rb.erb', fname) end |
#create_migrations ⇒ Object
17 18 19 |
# File 'lib/generators/consistency_check/install/install_generator.rb', line 17 def create_migrations migration_template 'migrations/create_consistency_check_results.rb.erb', 'db/migrate/create_consistency_check_results.rb' end |
#create_model ⇒ Object
21 22 23 24 |
# File 'lib/generators/consistency_check/install/install_generator.rb', line 21 def create_model fname = 'app/models/consistency_check_result.rb' template('models/consistency_check_result.rb.erb', fname) end |