Sha256: 793475c56eb211fa6a9112a697acac219ecd08f9c6b1958262788ab4e50035c4
Contents?: true
Size: 551 Bytes
Versions: 7
Compression:
Stored size: 551 Bytes
Contents
module Kaminari module ConfigurationMethods extend ActiveSupport::Concern module ClassMethods # Overrides the default per_page value per model # class Article < ActiveRecord::Base # paginates_per 10 # end def paginates_per(val) @_default_per_page = val end # This model's default per_page value # returns 25 unless explicitly overridden via <tt>paginates_per</tt> def default_per_page @_default_per_page || Kaminari::DEFAULT_PER_PAGE end end end end
Version data entries
7 entries across 7 versions & 2 rubygems