Flowdock
method

paginate

Importance_2
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActionController::Pagination

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.2.6) is shown here.

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.