提交 4c6ba743 编写于 作者: L Lauro Caetano

No need to call `to_sym` on reflection name, since the cache now works

with strings with string keys.

Related #14668.
上级 1f314884
......@@ -617,11 +617,11 @@ def association_primary_key(klass = nil)
# # => [:tag, :tags]
#
def source_reflection_names
(options[:source] ? [options[:source]] : [name.to_s.singularize, name]).collect { |n| n.to_sym }.uniq
(options[:source] ? [options[:source]] : [name.to_s.singularize, name]).collect { |n| n }.uniq
end
def source_reflection_name # :nodoc:
return @source_reflection_name.to_sym if @source_reflection_name
return @source_reflection_name if @source_reflection_name
names = [name.to_s.singularize, name].collect { |n| n.to_sym }.uniq
names = names.find_all { |n|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册