Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit e7eba93d82eae3d32dc63caa93896a9196e967f0 1 parent e7ee2a9
@arunagw arunagw 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.