aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods/primary_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb
index 8549414a12..095814b635 100644
--- a/activerecord/lib/active_record/attribute_methods/primary_key.rb
+++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb
@@ -50,7 +50,7 @@ module ActiveRecord
# This method also takes custom primary keys specified via
# the +set_primary_key+ into account.
def to_key
- new_record? ? nil : [ self.send(self.class.primary_key) ]
+ new_record? ? nil : [ self.primary_key ]
end
end