Permalink
Browse files

use Object#class instead of Object#type

  • Loading branch information...
bluetrans-deploy committed Jan 7, 2011
1 parent 989ffe4 commit 0ee9e074a37b45e496f3778bd6985491a74fa6d9
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/association_preload.rb
@@ -333,7 +333,7 @@ def preload_belongs_to_association(records, reflection, preload_options={})
table_name = klass.quoted_table_name
primary_key = reflection.options[:primary_key] || klass.primary_key
- column_type = klass.columns.detect{|c| c.name == primary_key}.type
+ column_type = klass.columns.detect{|c| c.name == primary_key}.class
ids = id_map.keys.map do |id|
if column_type == :integer
id.to_i

0 comments on commit 0ee9e07

Please sign in to comment.