mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Do not break ActiveRecord::Base.descendants, by making sure to call super from ActiveRecord::Base.inherited.
This commit is contained in:
parent
3cf08e5d9b
commit
cb65a17c45
2 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,8 @@ module Kaminari
|
|||
include Kaminari::PageScopeMethods
|
||||
end
|
||||
end
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -101,4 +101,9 @@ describe Kaminari::ActiveRecordExtension do
|
|||
its(:total_count) { should == 11 }
|
||||
its(:num_pages) { should == 3 }
|
||||
end
|
||||
|
||||
context 'activerecord descendants' do
|
||||
subject { ActiveRecord::Base.descendants }
|
||||
its(:length) { should_not == 0 }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue