aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/association_preload.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2010-10-31 10:04:56 +0000
committerJon Leighton <j@jonathanleighton.com>2010-10-31 10:04:56 +0000
commitd010fb13ef622bdb781e3134005fc849db4c9bea (patch)
tree8ca8beb957fb51923938c4e7befa35d44e711dba /activerecord/lib/active_record/association_preload.rb
parentfc276e5635821e65c04b8961170cc6bd3c11b923 (diff)
parent3cf85fb4fcdae65a4d5a1a5c418492ea0cf9ad6d (diff)
downloadrails-d010fb13ef622bdb781e3134005fc849db4c9bea.tar.gz
rails-d010fb13ef622bdb781e3134005fc849db4c9bea.tar.bz2
rails-d010fb13ef622bdb781e3134005fc849db4c9bea.zip
Merge branch 'master' into nested_has_many_through
Conflicts: activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/through_association_scope.rb
Diffstat (limited to 'activerecord/lib/active_record/association_preload.rb')
-rw-r--r--activerecord/lib/active_record/association_preload.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb
index bafd59fc02..c3ccb93ffd 100644
--- a/activerecord/lib/active_record/association_preload.rb
+++ b/activerecord/lib/active_record/association_preload.rb
@@ -338,7 +338,7 @@ module ActiveRecord
klass = klass_name.constantize
table_name = klass.quoted_table_name
- primary_key = reflection.options[:primary_key] || klass.primary_key
+ primary_key = (reflection.options[:primary_key] || klass.primary_key).to_s
column_type = klass.columns.detect{|c| c.name == primary_key}.type
ids = _id_map.keys.map do |id|