Set the hash value directly instead of using merge!

This commit is contained in:
Carlos Antonio da Silva 2012-06-21 22:54:14 -03:00
parent a4cc79d061
commit 4bbd35f7a6

@ -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)