lib/kaminari/models/configuration_methods.rb in kaminari-0.11.0 vs lib/kaminari/models/configuration_methods.rb in kaminari-0.12.0
- old
+ new
@@ -1,20 +1,20 @@
module Kaminari
module ConfigurationMethods
extend ActiveSupport::Concern
module ClassMethods
- # Overrides the default per_page value per model
+ # 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>
+ # This model's default +per_page+ value
+ # returns +default_per_page+ value unless explicitly overridden via <tt>paginates_per</tt>
def default_per_page
- @_default_per_page || Kaminari::DEFAULT_PER_PAGE
+ @_default_per_page || Kaminari.config.default_per_page
end
end
end
end