BigW Consortium Gitlab

Commit 39ae8398 by Douwe Maan

Use `try` instead of `repond_to?` and a method call

parent b7c1b05f
...@@ -37,8 +37,6 @@ class AwardEmoji < ActiveRecord::Base ...@@ -37,8 +37,6 @@ class AwardEmoji < ActiveRecord::Base
end end
def expire_etag_cache def expire_etag_cache
return unless awardable.respond_to?(:expire_etag_cache) awardable.try(:expire_etag_cache)
awardable.expire_etag_cache
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment