only cache the primary key column in one place

This commit is contained in:
Aaron Patterson 2013-06-13 15:57:48 -07:00
parent cbff6ee180
commit bf966ad8ee

@ -226,7 +226,7 @@ def type
end
def primary_key_column
@primary_key_column ||= klass.columns.find { |c| c.name == klass.primary_key }
klass.columns_hash[klass.primary_key]
end
def association_foreign_key