Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set the hash value directly instead of using merge!
  • Loading branch information
carlosantoniodasilva committed Jun 22, 2012
1 parent a4cc79d commit 4bbd35f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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)
Expand Down

0 comments on commit 4bbd35f

Please sign in to comment.