aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index c9f929680b..8f9cb85a90 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -691,7 +691,7 @@ module ActiveRecord
end
def _relation_for_itself
- self.class.unscoped.where(self.class.primary_key => id)
+ self.class.unscoped.where(self.class.primary_key => id_in_database)
end
def create_or_update(*args, &block)