From 2c45db11b2ef7ac0167a20358c45d5628b53005b Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Tue, 2 Apr 2013 11:34:50 -0400 Subject: no need to invoke to_s before applying intern --- activerecord/lib/active_record/associations/join_dependency.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/associations/join_dependency.rb b/activerecord/lib/active_record/associations/join_dependency.rb index f40368cfeb..e589959cf2 100644 --- a/activerecord/lib/active_record/associations/join_dependency.rb +++ b/activerecord/lib/active_record/associations/join_dependency.rb @@ -108,7 +108,7 @@ module ActiveRecord 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 -- cgit v1.2.3