1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

count + distinct: true won't work under AR 3.0

This commit is contained in:
Akira Matsuda 2013-11-10 03:42:41 +09:00
parent b9ad9bc5a6
commit 8c736ceb2a

View file

@ -51,7 +51,7 @@ if defined? ActiveRecord
end
end
if ActiveRecord::VERSION::STRING < '4.1.0'
if (ActiveRecord::VERSION::STRING >= '3.1.0') && (ActiveRecord::VERSION::STRING < '4.1.0')
context 'when count receives options' do
it 'should return a distinct set by column for rails < 4.1' do
User.page(1).count(:name, :distinct => true).should == 4