提交 08d94d3f 编写于 作者: T Tomasz Pajor 提交者: Jeremy Kemper

use Object#class instead of Object#type

上级 10ec012f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册