rewrite the item.respond_to?(:x?) && item.x? to item.try(:x?)
This commit is contained in:
parent
de25604fbc
commit
52709c6c8b
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue