mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Specify :group with the table name for it to work on sqlite3
This commit is contained in:
@@ -1756,7 +1756,7 @@ class BasicsTest < ActiveRecord::TestCase
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user