Permalink
Browse files

Specify :group with the table name for it to work on sqlite3

  • Loading branch information...
1 parent 6513dde commit 2381f6f3dc311f18164aeb4a253ced0feaeef8a9 @lifo lifo committed Apr 21, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/base_test.rb
@@ -1756,7 +1756,7 @@ def test_scoped_find_order_including_has_many_association
end
def test_scoped_find_with_group_and_having
- developers = Developer.with_scope(:find => { :group => 'salary', :having => "SUM(salary) > 10000", :select => "SUM(salary) as salary" }) do
+ developers = Developer.with_scope(:find => { :group => 'developers.salary', :having => "SUM(salary) > 10000", :select => "SUM(salary) as salary" }) do
Developer.find(:all)
end
assert_equal 3, developers.size

0 comments on commit 2381f6f

Please sign in to comment.