Use try instead of repond_to? and a method call

This commit is contained in:
Douwe Maan 2017-08-18 12:48:04 +02:00
parent b7c1b05f30
commit 39ae839804

View file

@ -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