提交 196af50e 编写于 作者: R Rafael Mendonça França

Merge pull request #10050 from neerajdotname/no-need-of-to_s-before-intern

no need to invoke to_s before applying intern
......@@ -108,7 +108,7 @@ def build(associations, parent = nil, join_type = Arel::InnerJoin)
parent ||= join_parts.last
case associations
when Symbol, String
reflection = parent.reflections[associations.to_s.intern] or
reflection = parent.reflections[associations.intern] or
raise ConfigurationError, "Association named '#{ associations }' was not found; perhaps you misspelled it?"
unless join_association = find_join_association(reflection, parent)
@reflections << reflection
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册