提交 4bbd35f7 编写于 作者: C Carlos Antonio da Silva

Set the hash value directly instead of using merge!

上级 a4cc79d0
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册