Skip to content

Commit

Permalink
count + distinct: true won't work under AR 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Nov 9, 2013
1 parent b9ad9bc commit 8c736ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
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
Expand Down

0 comments on commit 8c736ce

Please sign in to comment.