Skip to content
This repository
Browse code

use Object#class instead of Object#type

  • Loading branch information...
commit 08d94d3f7eafd99f16ea91359389c81be7ad3225 1 parent 10ec012
bluetrans-deploy authored January 07, 2011 jeremy committed January 09, 2011
2  activerecord/lib/active_record/association_preload.rb
@@ -333,7 +333,7 @@ def preload_belongs_to_association(records, reflection, preload_options={})
333 333
 
334 334
           table_name = klass.quoted_table_name
335 335
           primary_key = reflection.options[:primary_key] || klass.primary_key
336  
-          column_type = klass.columns.detect{|c| c.name == primary_key}.type
  336
+          column_type = klass.columns.detect{|c| c.name == primary_key}.class
337 337
           ids = id_map.keys.map do |id|
338 338
             if column_type == :integer
339 339
               id.to_i

1 note on commit 08d94d3

Raimonds Simanovskis

This commit should be reverted - see discussion at 9933859

Please sign in to comment.
Something went wrong with that request. Please try again.