提交 9a8af0c1 编写于 作者: C Carlos Antonio da Silva

Only call uniq on the conditional that actually needs it

上级 cf0e44c7
......@@ -617,7 +617,7 @@ def association_primary_key(klass = nil)
# # => [:tag, :tags]
#
def source_reflection_names
(options[:source] ? [options[:source]] : [name.to_s.singularize, name]).uniq
options[:source] ? [options[:source]] : [name.to_s.singularize, name].uniq
end
def source_reflection_name # :nodoc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册