From cad0b7d91dbc5abf4b0d7fdbcf2d0620557a3b0f Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 9 Jun 2018 17:30:00 +0900 Subject: Fix `touch` option to behave consistently with `Persistence#touch` method `touch` option was added to `increment!` (#27660) and `update_counters` (#26995). But that option behaves inconsistently with `Persistence#touch` method. If `touch` option is passed attribute names, it won't update update_at/on attributes unlike `Persistence#touch` method. Due to changed from `Persistence#touch` to `increment!` with `touch` option, #31405 has a regression that `counter_cache` with `touch` option which is passed attribute names won't update update_at/on attributes. I think that the inconsistency is not intended. To get back consistency, ensure that `touch` option updates update_at/on attributes. --- activerecord/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 231837dcb7..fad09182c9 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Fix `touch` option to behave consistently with `Persistence#touch` method. + + *Ryuta Kamizono* + * Migrations raise when duplicate column definition. Fixes #33024. -- cgit v1.2.3