mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
move DEFAULT_PER_PAGE to ::Kaminari module
This commit is contained in:
parent
5dd68ee5fc
commit
4488137230
2 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
|||
module Kaminari
|
||||
DEFAULT_PER_PAGE = 25 unless defined? ::Kaminari::DEFAULT_PER_PAGE
|
||||
|
||||
module ActiveRecordExtension
|
||||
extend ActiveSupport::Concern
|
||||
DEFAULT_PER_PAGE = 25
|
||||
|
||||
included do
|
||||
def self.inherited(kls) #:nodoc:
|
||||
|
@ -51,7 +52,7 @@ module Kaminari
|
|||
# This model's default per_page value
|
||||
# returns 25 unless explicitly overridden via <tt>paginates_per</tt>
|
||||
def self.default_per_page
|
||||
@_default_per_page || Kaminari::ActiveRecordExtension::DEFAULT_PER_PAGE
|
||||
@_default_per_page || Kaminari::DEFAULT_PER_PAGE
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Kaminari
|
||||
module MongoidExtension
|
||||
DEFAULT_PER_PAGE = 25
|
||||
DEFAULT_PER_PAGE = 25 unless defined? ::Kaminari::DEFAULT_PER_PAGE
|
||||
|
||||
module MongoidExtension
|
||||
module Criteria
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
@ -55,7 +55,7 @@ module Kaminari
|
|||
# This model's default per_page value
|
||||
# returns 25 unless explicitly overridden via <tt>paginates_per</tt>
|
||||
def self.default_per_page
|
||||
@_default_per_page || Kaminari::MongoidExtension::DEFAULT_PER_PAGE
|
||||
@_default_per_page || Kaminari::DEFAULT_PER_PAGE
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue