diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-08 12:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-08 12:09:33 +0300 |
commit | 7752bfa10fc817c6455f7e287d233fb6cd61a599 (patch) | |
tree | ec1871921f6f0040789478d95dfe4f286f482533 /app/models/award_emoji.rb | |
parent | cf1382025171f9e5f9147fdfbbff1d9f230a9fdd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/award_emoji.rb')
-rw-r--r-- | app/models/award_emoji.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/models/award_emoji.rb b/app/models/award_emoji.rb index 41687febcf2..7679f6fce72 100644 --- a/app/models/award_emoji.rb +++ b/app/models/award_emoji.rb @@ -24,8 +24,8 @@ class AwardEmoji < ApplicationRecord scope :named, -> (names) { where(name: names) } scope :awarded_by, -> (users) { where(user: users) } - after_save :expire_etag_cache - after_destroy :expire_etag_cache + after_save :expire_cache + after_destroy :expire_cache class << self def votes_for_collection(ids, type) @@ -60,7 +60,8 @@ class AwardEmoji < ApplicationRecord self.name == UPVOTE_NAME end - def expire_etag_cache + def expire_cache + awardable.try(:bump_updated_at) awardable.try(:expire_etag_cache) end end |