Skip to content
Snippets Groups Projects
Commit c67e9bb3 authored by Sean McGivern's avatar Sean McGivern 🔴
Browse files

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
No related branches found
No related tags found
Loading
Pipeline #
......@@ -58,13 +58,13 @@ def project_options(issuable, current_user, ability: :read_project)
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'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment