require "rails/generators"
require "rails/generators/rails/controller/controller_generator"
require "rails/generators/rails/scaffold_controller/scaffold_controller_generator"

module Rails
  module Generators
    class ControllerGenerator
      hook_for :decorator, default: true do |generator|
        invoke generator, [name.singularize]
      end
    end

    class ScaffoldControllerGenerator
      hook_for :decorator, default: true
    end
  end
end

require "rails/generators"
require "rails/generators/rails/controller/controller_generator"
require "rails/generators/rails/scaffold_controller/scaffold_controller_generator"

module Rails
  module Generators
    class ControllerGenerator
      hook_for :decorator, type: :boolean, default: true do |generator|
        invoke generator, [name.singularize]
      end
    end

    class ScaffoldControllerGenerator
      hook_for :decorator, type: :boolean, default: true
    end
  end
end

Fix warnings with recent thor versions
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.
