Set the hash value directly instead of using merge!
This commit is contained in:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user