mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
No need for Railtie => Hooks => ArrayExtension. Just directly load ArrayExtension when loading the gem
This commit is contained in:
parent
9371c685d8
commit
653143bbd8
3 changed files with 2 additions and 10 deletions
|
@ -14,9 +14,8 @@ require 'kaminari/exceptions'
|
|||
require 'kaminari/helpers/paginator'
|
||||
require 'kaminari/models/page_scope_methods'
|
||||
require 'kaminari/models/configuration_methods'
|
||||
require 'kaminari/hooks'
|
||||
require 'kaminari/models/array_extension'
|
||||
|
||||
# if not using Railtie, call `Kaminari::Hooks.init` directly
|
||||
if defined? ::Rails::Railtie
|
||||
require 'kaminari/railtie'
|
||||
require 'kaminari/engine'
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
module Kaminari
|
||||
class Hooks
|
||||
def self.init
|
||||
require 'kaminari/models/array_extension'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
module Kaminari
|
||||
class Railtie < ::Rails::Railtie #:nodoc:
|
||||
# Doesn't actually do anything. Just keeping this hook point, mainly for compatibility
|
||||
initializer 'kaminari' do
|
||||
Kaminari::Hooks.init
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue