Add will_paginate instructions

[ci skip]
This commit is contained in:
Andrew Haines 2013-01-23 11:29:41 +00:00
parent ae1f1236a2
commit 6ca2897278
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,8 @@ end
The `delegate` method used here is the same as that added by [Active Support](http://api.rubyonrails.org/classes/Module.html#method-i-delegate), except that the `:to` option is not required; it defaults to `:source` when omitted.
[will_paginate](https://github.com/mislav/will_paginate) needs you to `delegate :current_page, :per_page, :offset, :total_entries, :total_pages`.
### Decorating Associated Objects
You can automatically decorate associated models when the primary model is decorated. Assuming an `Article` model has an associated `Author` object: