aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-13 16:50:22 -0700
committerXavier Noria <fxn@hashref.com>2010-08-14 13:17:31 +0200
commit22b9bbc828f1d318748b99948c3e9eca43750991 (patch)
tree02c31913cdcaee81bf121352a4e873b78e81d334 /activerecord/lib
parent6a14eee918f6004f3d2eb3e1f93180deb41015b5 (diff)
downloadrails-22b9bbc828f1d318748b99948c3e9eca43750991.tar.gz
rails-22b9bbc828f1d318748b99948c3e9eca43750991.tar.bz2
rails-22b9bbc828f1d318748b99948c3e9eca43750991.zip
converting to a symbol is not necessary
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index bf278ecce7..096709e166 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1505,7 +1505,7 @@ module ActiveRecord
if reflection.through_reflection && reflection.source_reflection.belongs_to?
through = reflection.through_reflection
primary_key = reflection.source_reflection.primary_key_name
- send(through.name).select("DISTINCT #{through.quoted_table_name}.#{primary_key}").map! { |r| r.send(:"#{primary_key}") }
+ send(through.name).select("DISTINCT #{through.quoted_table_name}.#{primary_key}").map! { |r| r.send(primary_key) }
else
send(reflection.name).select("#{reflection.quoted_table_name}.#{reflection.klass.primary_key}").except(:includes).map! { |r| r.id }
end