Commit 52709c6c authored by dimitrieh's avatar dimitrieh

rewrite the item.respond_to?(:x?) && item.x? to item.try(:x?)

parent de25604f
......@@ -58,13 +58,13 @@ module IssuesHelper
end
def status_box_class(item)
if item.respond_to?(:expired?) && item.expired?
if item.try(:expired?)
'status-box-expired'
elsif item.respond_to?(:merged?) && item.merged?
elsif item.try(:merged?)
'status-box-merged'
elsif item.closed?
'status-box-closed'
elsif item.respond_to?(:upcoming?) && item.upcoming?
elsif item.try(:upcoming?)
'status-box-upcoming'
else
'status-box-open'
......
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