Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set the hash value directly instead of using merge!

  • Loading branch information...
commit 4bbd35f7a6c495959ffa2d08a88302f34b9a2531 1 parent a4cc79d
@carlosantoniodasilva carlosantoniodasilva authored
View
2  activerecord/lib/active_record/associations/collection_association.rb
@@ -186,7 +186,7 @@ def count(column_name = nil, count_options = {})
if options[:uniq]
# This is needed because 'SELECT count(DISTINCT *)..' is not valid SQL.
column_name ||= reflection.klass.primary_key
- count_options.merge!(:distinct => true)
+ count_options[:distinct] = true
end
value = scoped.count(column_name, count_options)
Please sign in to comment.
Something went wrong with that request. Please try again.