mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
stop abusing bang method
This commit is contained in:
parent
c3223aaacd
commit
3d9ecb4dd1
5 changed files with 5 additions and 5 deletions
|
@ -31,7 +31,7 @@ require 'kaminari/models/page_scope_methods'
|
|||
require 'kaminari/models/configuration_methods'
|
||||
require 'kaminari/hooks'
|
||||
|
||||
# if not using Railtie, call `Kaminari::Hooks.init!` directly
|
||||
# if not using Railtie, call `Kaminari::Hooks.init` directly
|
||||
if defined? Rails
|
||||
require 'kaminari/railtie'
|
||||
require 'kaminari/engine'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'grape'
|
||||
require 'kaminari'
|
||||
|
||||
Kaminari::Hooks.init!
|
||||
Kaminari::Hooks.init
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Kaminari
|
||||
class Hooks
|
||||
def self.init!
|
||||
def self.init
|
||||
ActiveSupport.on_load(:active_record) do
|
||||
require 'kaminari/models/active_record_extension'
|
||||
::ActiveRecord::Base.send :include, Kaminari::ActiveRecordExtension
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Kaminari
|
||||
class Railtie < ::Rails::Railtie #:nodoc:
|
||||
initializer 'kaminari' do |_app|
|
||||
Kaminari::Hooks.init!
|
||||
Kaminari::Hooks.init
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ require 'sinatra/base'
|
|||
require 'kaminari'
|
||||
require 'kaminari/helpers/sinatra_helpers'
|
||||
|
||||
Kaminari::Hooks.init!
|
||||
Kaminari::Hooks.init
|
||||
|
|
Loading…
Reference in a new issue