Module: DatashiftJourney::GenerateCommon
- Included in:
- CollectorGenerator, CollectorGenerator
- Defined in:
- lib/generators/datashift_journey/generate_common.rb
Instance Method Summary collapse
-
#journey_plan_filename ⇒ Object
Module name = optionsJourney.
- #model_path ⇒ Object
-
#next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
Instance Method Details
#journey_plan_filename ⇒ Object
Module name = optionsJourney
19 20 21 |
# File 'lib/generators/datashift_journey/generate_common.rb', line 19 def journey_plan_filename "#{DatashiftJourney.journey_plan_class.to_s.underscore}.rb" end |
#model_path ⇒ Object
13 14 15 |
# File 'lib/generators/datashift_journey/generate_common.rb', line 13 def model_path @model_path ||= File.join(destination_root, "app", "models", journey_plan_filename) end |
#next_migration_number(dirname) ⇒ Object
Implement the required interface for Rails::Generators::Migration.
8 9 10 11 |
# File 'lib/generators/datashift_journey/generate_common.rb', line 8 def next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |