will_paginateのpaginate
メソッドのオプションを理解しようとしています:
: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
およびfinder
は簡単です。
total_entries
およびcount
-「手動でエントリをカウントする場合にのみ使用する」を理解していませんか?彼らは、別のカウントクエリを実行し、その結果をpaginate
オプションとして渡すシナリオを想定していますか?あなたがそれをする状況は何でしょうか?
「カウントに渡される追加のオプション」-どのようなオプションが利用可能ですか?count
???の方法に「渡す」