1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/spec/fake_gem.rb
Akira Matsuda 6fed8cd8fd A test for AR::Base.inherited
Ensure that Kaminari does not conflict with other gems that extend the inherited hook
2015-02-11 16:17:46 +09:00

20 lines
447 B
Ruby

module Kaminari
module FakeGem
extend ActiveSupport::Concern
module ClassMethods
def inherited(kls)
super
def kls.fake_gem_defined_method; end
end
end
end
end
ActiveSupport.on_load :active_record do
ActiveRecord::Base.send :include, Kaminari::FakeGem
# Simulate a gem providing a subclass of ActiveRecord::Base before the Railtie is loaded.
class GemDefinedModel < ActiveRecord::Base
end
end