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.
find_collection_for_pagination (model, options, paginator)
protected
Returns a collection of items for the given model and
+options[conditions]+, ordered by +options[order]+, for the current page in
the given paginator . Override this method to implement a custom
finder.
Show source # File actionpack/lib/action_controller/pagination.rb, line 188
def find_collection_for_pagination(model, options, paginator)
model.find(:all, :conditions => options[:conditions],
:order => options[:order_by] || options[:order],
:joins => options[:join] || options[:joins], :include => options[:include],
:select => options[:select], :limit => options[:per_page],
:offset => paginator.current.offset)
end