summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-08-18 12:48:04 +0200
committerDouwe Maan <douwe@selenight.nl>2017-08-18 12:48:04 +0200
commit39ae8398049b717fb366e7fb77ab87197f8c70cc (patch)
tree5269d0f34b6f0b3d9ee8cdfda3526c9092e57d4c
parentb7c1b05f30fc45484510f65a5889a89869a7937c (diff)
downloadgitlab-ce-39ae8398049b717fb366e7fb77ab87197f8c70cc.tar.gz
Use `try` instead of `repond_to?` and a method call
-rw-r--r--app/models/award_emoji.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/award_emoji.rb b/app/models/award_emoji.rb
index b4e8bf836c2..4d1a15c53aa 100644
--- a/app/models/award_emoji.rb
+++ b/app/models/award_emoji.rb
@@ -37,8 +37,6 @@ class AwardEmoji < ActiveRecord::Base
end
def expire_etag_cache
- return unless awardable.respond_to?(:expire_etag_cache)
-
- awardable.expire_etag_cache
+ awardable.try(:expire_etag_cache)
end
end