Sha256: 1f01b97c80e1cc4f027b4187a8e4404c0a32cac9970d989444c8d831318c6fc6
Contents?: true
Size: 493 Bytes
Versions: 24
Compression:
Stored size: 493 Bytes
Contents
require 'active_support/concern' module Brightcontent module Pagination extend ActiveSupport::Concern module ClassMethods def per_page_count @per_page_count ||= 30 end def per_page(number) @per_page_count = number end end private def end_of_association_chain if action_name == "index" super.paginate(page: params[:page], per_page: self.class.per_page_count) else super end end end end
Version data entries
24 entries across 24 versions & 1 rubygems