Permalink
Browse files

no need to invoke to_s before applying intern

  • Loading branch information...
Neeraj Singh
Neeraj Singh committed Apr 2, 2013
1 parent 9030015 commit 2c45db11b2ef7ac0167a20358c45d5628b53005b
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/join_dependency.rb
@@ -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

0 comments on commit 2c45db1

Please sign in to comment.