Use try
instead of repond_to?
and a method call
This commit is contained in:
parent
b7c1b05f30
commit
39ae839804
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue