Sha256: 73a8bb13b33dcbc832ae46caa56b7cffdac15ce1d8b9c0bd8433ae6cc67d64ac
Contents?: true
Size: 423 Bytes
Versions: 8
Compression:
Stored size: 423 Bytes
Contents
require 'active_support/concern' module Brightcontent module Pagination extend ActiveSupport::Concern module ClassMethods def per_page(number) @per_page_count = number end def per_page_count @per_page_count || 30 end end private def end_of_association_chain super.paginate(page: params[:page], per_page: self.class.per_page_count) end end end
Version data entries
8 entries across 8 versions & 2 rubygems