Class: Hancock::Cms::Controllers::DecoratorsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hancock::Cms::Controllers::DecoratorsGenerator
- Defined in:
- lib/generators/hancock/cms/controllers/decorators_generator.rb
Instance Method Summary collapse
Instance Method Details
#decorators ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/generators/hancock/cms/controllers/decorators_generator.rb', line 11 def decorators copied = false (controllers == ['all'] ? permitted_controllers : controllers & permitted_controllers).each do |c| copied = true copy_file "#{c}.rb", "app/controllers/concerns/hancock/decorators/#{c}.rb" end puts "U need to set controller`s name. One of this: #{permitted_controllers.join(", ")} or `all`." unless copied end |