From be16f54d9d167c6338367c8175aaf135c44dab94 Mon Sep 17 00:00:00 2001 From: Jasper Maes Date: Wed, 13 Jun 2018 07:48:05 +0200 Subject: [PATCH] Rails5 fix expected `issuable.reload.updated_at` to have changed --- app/models/timelog.rb | 5 +++++ changelogs/unreleased/rails5-fix-47366.yml | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 changelogs/unreleased/rails5-fix-47366.yml diff --git a/app/models/timelog.rb b/app/models/timelog.rb index f4c5c581a11..659146f43e4 100644 --- a/app/models/timelog.rb +++ b/app/models/timelog.rb @@ -19,4 +19,9 @@ class Timelog < ActiveRecord::Base errors.add(:base, 'Issue or Merge Request ID is required') end end + + # Rails5 defaults to :touch_later, overwrite for normal touch + def belongs_to_touch_method + :touch + end end diff --git a/changelogs/unreleased/rails5-fix-47366.yml b/changelogs/unreleased/rails5-fix-47366.yml new file mode 100644 index 00000000000..7ea03d2b95e --- /dev/null +++ b/changelogs/unreleased/rails5-fix-47366.yml @@ -0,0 +1,5 @@ +--- +title: Rails5 fix expected `issuable.reload.updated_at` to have changed +merge_request: 19733 +author: Jasper Maes +type: fixed