Skip to content

Commit 1ce87cf

Browse files
committed
Get rid of duplicated @quoted_primary_key cache
Related to 00550c7.
1 parent 9d28357 commit 1ce87cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

activerecord/lib/active_record/attribute_methods/primary_key.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def composite_primary_key? # :nodoc:
9090
# Returns a quoted version of the primary key name, used to construct
9191
# SQL statements.
9292
def quoted_primary_key
93-
@quoted_primary_key ||= adapter_class.quote_column_name(primary_key)
93+
adapter_class.quote_column_name(primary_key)
9494
end
9595

9696
def reset_primary_key # :nodoc:
@@ -136,7 +136,6 @@ def primary_key=(value)
136136
elsif value
137137
-value.to_s
138138
end
139-
@quoted_primary_key = nil
140139
@attributes_builder = nil
141140
end
142141

@@ -146,7 +145,6 @@ def inherited(base)
146145
base.class_eval do
147146
@primary_key = PRIMARY_KEY_NOT_SET
148147
@composite_primary_key = false
149-
@quoted_primary_key = nil
150148
@attributes_builder = nil
151149
end
152150
end

0 commit comments

Comments
 (0)