1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/lib/kaminari/hooks.rb
2016-06-21 20:56:28 +09:00

17 lines
491 B
Ruby

module Kaminari
class Hooks
def self.init
ActiveSupport.on_load(:active_record) do
require 'kaminari/models/active_record_extension'
::ActiveRecord::Base.send :include, Kaminari::ActiveRecordExtension
end
require 'kaminari/models/array_extension'
ActiveSupport.on_load(:action_view) do
require 'kaminari/helpers/action_view_extension'
::ActionView::Base.send :include, Kaminari::ActionViewExtension
end
end
end
end