Permalink
Browse files

Revert "use Object#class instead of Object#type"

This reverts commit 08d94d3.
  • Loading branch information...
1 parent 08d94d3 commit bc302f2aeca132becef9a5de98957dac81128f03 @jeremy jeremy committed Jan 10, 2011
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}.class
+ column_type = klass.columns.detect{|c| c.name == primary_key}.type
ids = id_map.keys.map do |id|
if column_type == :integer
id.to_i

0 comments on commit bc302f2

Please sign in to comment.