From 39ae8398049b717fb366e7fb77ab87197f8c70cc Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Fri, 18 Aug 2017 12:48:04 +0200 Subject: Use `try` instead of `repond_to?` and a method call --- app/models/award_emoji.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/models/award_emoji.rb') 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 -- cgit v1.2.1