aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorMike Gunderloy <MikeG1@larkfarm.com>2009-02-28 11:01:13 -0600
committerPratik Naik <pratiknaik@gmail.com>2009-02-28 17:35:58 +0000
commitc653f700d3afb1208b15fb7fec6250bf3a3f0321 (patch)
treea4917b824ccade75fe04e7d0e3fb50c3be81d29f /activerecord/lib
parentdcd9c7f58e7194c026145273c7695cf968569d33 (diff)
downloadrails-c653f700d3afb1208b15fb7fec6250bf3a3f0321.tar.gz
rails-c653f700d3afb1208b15fb7fec6250bf3a3f0321.tar.bz2
rails-c653f700d3afb1208b15fb7fec6250bf3a3f0321.zip
Fix that scoped find with :group and :having [#2006 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 55ab1facf2..206b4efa38 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1759,7 +1759,7 @@ module ActiveRecord #:nodoc:
scope = scope(:find) if :auto == scope
if scope && (scoped_group = scope[:group])
sql << " GROUP BY #{scoped_group}"
- sql << " HAVING #{scoped_having}" if (scoped_having = scope[:having])
+ sql << " HAVING #{scope[:having]}" if scope[:having]
end
end
end