Module: ActionController::Pagination::ClassMethods
- Defined in:
- vendor/plugins/classic_pagination/lib/pagination.rb
Overview
These methods become class methods on any controller
Instance Method Summary
-
- (Object) paginate(collection_id, options = {})
Creates a before_filter which automatically paginates an Active Record model for all actions in a controller (or certain actions if specified with the :actions option).
Instance Method Details
- (Object) paginate(collection_id, options = {})
Creates a before_filter which automatically paginates an Active Record model for all actions in a controller (or certain actions if specified with the :actions option).
options are the same as PaginationHelper#paginate, with the addition of:
:actions: | an array of actions for which the pagination is active. Defaults to nil (i.e., every action) |
146 147 148 149 150 151 152 153 |
# File 'vendor/plugins/classic_pagination/lib/pagination.rb', line 146 def paginate(collection_id, ={}) Pagination.(collection_id, , false) module_eval do before_filter :create_paginators_and_retrieve_collections OPTIONS[self] ||= Hash.new OPTIONS[self][collection_id] = end end |