Closed tombeynon closed 9 years ago
Also any comments on memoization of the paginated_collection
method?
Everyone happy with this? So long as you include the pagination module and call end_of_association_chain
in your collection method, the pagination scopes will be applied
Looks good :+1:
:+1:
I think we should remove the pagination from the
collection
method, and instead provide a separate method for the paginated collection.My main reason for this is that
collection
currently only adds pagination if the instance variable (e.g. @images) hasn't been set already. Adding apaginated_collection
method also provides an easy hook to change pagination as needed in subclasses.Do you guys have any preference on the name of the method, and how it's been implemented?