Commit c67e9bb3 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'minor-ruby-status-badge-changes' into 'master'

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

See merge request !8409
parents ed271836 52709c6c
......@@ -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