Flowdock
method

paginate

Importance_2
v1.1.6 - Show latest stable - 0 notes - Class: ActionController::Pagination
paginate(collection_id, options={}) public

Returns a paginator and a collection of Active Record model instances for the paginator’s current page. This is designed to be used in a single action; to automatically paginate multiple actions, consider ClassMethods#paginate.

options are:

:singular_name:the singular name to use, if it can’t be inferred by
                       singularizing the collection name
:class_name:the class name to use, if it can’t be inferred by camelizing the singular name
:per_page:the maximum number of items to include in a single page. Defaults to 10
:conditions:optional conditions passed to Model.find(:all, *params) and Model.count
:order:optional order parameter passed to Model.find(:all, *params)
:order_by:(deprecated, used :order) optional order parameter passed to Model.find(:all, *params)
:joins:optional joins parameter passed to Model.find(:all, *params) and Model.count
:join:(deprecated, used :joins or :include) optional join parameter passed to Model.find(:all, *params) and Model.count
:include:optional eager loading parameter passed to Model.find(:all, *params) and Model.count
:select::select parameter passed to Model.find(:all, *params)
:count:parameter passed as :select option to Model.count(*params)
Show source
Register or log in to add new notes.