Permalink
Browse files

only cache the primary key column in one place

  • Loading branch information...
1 parent cbff6ee commit bf966ad8eef6e42c0d23b48cd1ccc04809d7f68f @tenderlove tenderlove committed Jun 13, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/reflection.rb
@@ -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

0 comments on commit bf966ad

Please sign in to comment.