mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
Updated Readme
This commit is contained in:
parent
62d80310f4
commit
969473db10
1 changed files with 11 additions and 1 deletions
|
@ -135,9 +135,19 @@ config.generators do |g|
|
|||
g.helper false
|
||||
end
|
||||
```
|
||||
|
||||
If you want a helper, you can still call `rails generate helper` directly.
|
||||
|
||||
|
||||
#### Replace Rails Helper Generation with Decorator Generation (Optional)
|
||||
|
||||
If you want to completely replace the helper generation with the decorator generator, just add this to your `config/application.rb`
|
||||
|
||||
```ruby
|
||||
config.generators do |g|
|
||||
g.helper :decorator
|
||||
end
|
||||
```
|
||||
|
||||
### Generate the Decorator
|
||||
|
||||
To decorate a model named `Article`:
|
||||
|
|
Loading…
Reference in a new issue