Fix warnings with recent thor versions
Otherwise running things like `bin/rails g --help` with `draper` installed leads to warnings like this: ``` Expected string default value for '--decorator'; got true (boolean) ``` See https://github.com/erikhuda/thor/issues/538 for reference.
This commit is contained in:
parent
27357367c7
commit
da5ac7c7ce
|
@ -5,13 +5,13 @@ require "rails/generators/rails/scaffold_controller/scaffold_controller_generato
|
|||
module Rails
|
||||
module Generators
|
||||
class ControllerGenerator
|
||||
hook_for :decorator, default: true do |generator|
|
||||
hook_for :decorator, type: :boolean, default: true do |generator|
|
||||
invoke generator, [name.singularize]
|
||||
end
|
||||
end
|
||||
|
||||
class ScaffoldControllerGenerator
|
||||
hook_for :decorator, default: true
|
||||
hook_for :decorator, type: :boolean, default: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue