Skip to content

Commit

Permalink
only cache the primary key column in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jun 13, 2013
1 parent cbff6ee commit bf966ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/reflection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf966ad

Please sign in to comment.