From e835596ae882e748e452e52131c2a4244336660b Mon Sep 17 00:00:00 2001 From: Jakob Skjerning Date: Wed, 14 Sep 2016 17:07:15 +0200 Subject: Clear attribute changes after handling locking Without this the changes to the lock version column will stick around even after `touch` returns. Before: model.touch model.changes # => {"lock_version"=>[0, "1"]} After: model.touch model.changes # {} --- activerecord/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index bca719cb2f..786420f51e 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,10 @@ +* Calling `touch` on a model using optimistic locking will now leave the model + in a non-dirty state with no attribute changes. + + Fixes #26496. + + *Jakob Skjerning* + * Using a mysql2 connection after it fails to reconnect will now have an error message saying the connection is closed rather than an undefined method error message. -- cgit v1.2.3