Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix touch option to behave consistently with Persistence#touch method #33107

Merged
merged 1 commit into from Jun 18, 2018

Commits on Jun 10, 2018

  1. Fix touch option to behave consistently with Persistence#touch me…

    …thod
    
    `touch` option was added to `increment!` (rails#27660) and `update_counters`
    (rails#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, rails#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.
    kamipo committed Jun 10, 2018
    Copy the full SHA
    1190414 View commit details
    Browse the repository at this point in the history