Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pg does not allow aliases in the having clause, but functions are fine

  • Loading branch information...
commit 5a05207d99b7e2678f9b42db2d9ffc21ec2c8c3b 1 parent 04f88d1
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/test/cases/calculations_test.rb
View
2  activerecord/test/cases/calculations_test.rb
@@ -171,7 +171,7 @@ def test_should_group_by_summed_field_having_sanitized_condition
end
def test_should_group_by_summed_field_having_condition_from_select
- c = Account.select("MIN(credit_limit) AS min_credit_limit").group(:firm_id).having("min_credit_limit > 50").sum(:credit_limit)
+ c = Account.select("MIN(credit_limit) AS min_credit_limit").group(:firm_id).having("MIN(credit_limit) > 50").sum(:credit_limit)
assert_nil c[1]
assert_equal 60, c[2]
assert_equal 53, c[9]
Please sign in to comment.
Something went wrong with that request. Please try again.