Readme updated to reflect new generator hook

You get a decorator whenever you create a controller. Still using 'generate resource' in the example to clearify this works from all generators that create controllers.
This commit is contained in:
Azul 2013-06-08 08:27:14 +02:00
parent cd4f298987
commit 179512a36a
1 changed files with 2 additions and 1 deletions

View File

@ -131,11 +131,12 @@ end
### Generators ### Generators
When you have Draper installed and generate a resource with... When you have Draper installed and generate a controller for example with...
``` ```
rails generate resource Article rails generate resource Article
``` ```
...you'll get a decorator for free! ...you'll get a decorator for free!
But if the `Article` model already exists, you can run... But if the `Article` model already exists, you can run...