Trying to understand the options for will_paginate's paginate
method:
:page — REQUIRED, but defaults to 1 if false or nil
:per_page — defaults to CurrentModel.per_page (which is 30 if not overridden)
:total_entries — use only if you manually count total entries
:count — additional options that are passed on to count
:finder — name of the ActiveRecord finder used (default: “find”)
page
, per_page
, and finder
are straightforward.
total_entries
and count
-- don't understand "use only if you manually count entries?" Are they envisioning a scenario where you'd run a separate count query, then pass the result to paginate
as an option? What would be the circumstances where you'd do that?
"additional options that are passed on to count" -- What options are available? "Pass on" to the count
method of ???