1
0
Fork 0
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:
Rolf Timmermans 2011-02-24 09:19:51 +01:00
parent 3cf08e5d9b
commit cb65a17c45
2 changed files with 7 additions and 0 deletions

View file

@ -24,6 +24,8 @@ module Kaminari
include Kaminari::PageScopeMethods
end
end
super
end
end
end

View file

@ -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