Class: DatashiftJourney::InstallMongoCollectorGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DatashiftJourney::InstallMongoCollectorGenerator
- Extended by:
- InitializerCommon
- Includes:
- InitializerCommon
- Defined in:
- lib/generators/datashift_journey/collector/install_mongo_collector_generator.rb
Instance Method Summary collapse
-
#install_common ⇒ Object
Hmm bit odd but to get thor to work appears we need to wrap calls to our common methods.
- #install_migrations ⇒ Object
- #migration_data ⇒ Object
Instance Method Details
#install_common ⇒ Object
Hmm bit odd but to get thor to work appears we need to wrap calls to our common methods
18 19 20 21 22 23 24 25 26 |
# File 'lib/generators/datashift_journey/collector/install_mongo_collector_generator.rb', line 18 def install_common create_initializer_file(klass) notify_about_routes journey_decorator(klass) model_journey_code(klass) end |
#install_migrations ⇒ Object
9 10 11 12 |
# File 'lib/generators/datashift_journey/collector/install_mongo_collector_generator.rb', line 9 def install_migrations say_status :copying, 'migrations' `rake railties:install:migrations` end |
#migration_data ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/generators/datashift_journey/collector/install_mongo_collector_generator.rb', line 28 def migration_data <<RUBY field :form, type: String field :field , type: String field :value, type: String RUBY end |