Merge pull request #779 from deivid-rodriguez/warnings

Fix warnings with recent versions of `thor`
This commit is contained in:
Sean Linsley 2017-02-26 20:31:22 -06:00 committed by GitHub
commit 0bb5cded88
2 changed files with 11 additions and 4 deletions

View File

@ -107,13 +107,20 @@ Decorators are the ideal place to:
## Installation
Add Draper to your Gemfile:
Add Draper to your Gemfile. If you're using `Rails 5`, use the `3.0.0` version
pre-release
```ruby
gem 'draper', '3.0.0.pre1'
```
Otherwise, use the latest released version
```ruby
gem 'draper'
```
And run `bundle install` within your app's directory.
After that, run `bundle install` within your app's directory.
If you're upgrading from a 0.x release, the major changes are outlined [in the
wiki](https://github.com/drapergem/draper/wiki/Upgrading-to-1.0).

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