module ActionPager::Pagination
Constants
- DEFAULTS
Public Instance Methods
pager_for(collection, options={})
click to toggle source
# File lib/action_pager/pagination.rb, line 5 def pager_for(collection, options={}) opts = DEFAULTS.merge(options.reject { |_k, v| v.to_i.zero? }) ActionPager::Pager.new( collection, page: opts[:page].to_i, per: opts[:per].to_i ) end