Permalink
Browse files

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

  • Loading branch information...
lifo committed Apr 21, 2009
1 parent 3267097 commit 5bbd097ce990d6830c832435867b06108de5bf08
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 5bbd097

Please sign in to comment.