Reflect changed collection decorator behavior in README

This commit is contained in:
Andrew Haines 2013-02-15 09:30:12 +00:00
parent f3647f55d8
commit cf04814788
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ end
@articles = ArticlesDecorator.decorate(Article.all)
```
Draper infers the decorator used for each item from the name of the collection decorator (`ArticlesDecorator` implies `ArticleDecorator`). If that fails, it falls back to using each item's `decorate` method. Alternatively, you can specify a decorator by overriding the collection decorator's `decorator_class` method.
Draper decorates each item using its `decorate` method. Alternatively, you can specify a decorator by overriding the collection decorator's `decorator_class` method, or by passing the `:with` option to the constructor.
#### Using pagination