mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Specify :group with the table name for it to work on sqlite3
This commit is contained in:
parent
6513dde490
commit
2381f6f3dc
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue