Class: ActionModels::TargetsManyGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActionModels::TargetsManyGenerator
- Includes:
- SuperScaffoldBase
- Defined in:
- lib/generators/super_scaffold/action_models/targets_many/targets_many_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/generators/super_scaffold/action_models/targets_many/targets_many_generator.rb', line 24 def generate if defined?(BulletTrain::ActionModels) # We add the name of the specific super_scaffolding command that we want to # invoke to the beginning of the argument string. ARGV.unshift "action-models:targets-many" BulletTrain::SuperScaffolding::Runner.new.run else puts "You must have Action Models installed if you want to use this generator.".red puts "Please refer to the documentation for more information: https://bullettrain.co/docs/action-models" end end |