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:
David Rodríguez 2017-02-25 10:56:32 -03:00
parent 27357367c7
commit da5ac7c7ce
1 changed files with 2 additions and 2 deletions

View File

@ -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