diff options
author | dimitrieh <dimitriehoekstra@gmail.com> | 2017-01-03 11:30:58 +0100 |
---|---|---|
committer | dimitrieh <dimitriehoekstra@gmail.com> | 2017-01-03 11:31:49 +0100 |
commit | 52709c6c8bb5bb00981a4ed7fa10195c32573ea9 (patch) | |
tree | c2d52a2bc814647eeb7c6be25aae30d77d2f91d2 /app/helpers/issues_helper.rb | |
parent | de25604fbca2f7005754d821d571bbcb1cc510ac (diff) | |
download | gitlab-ce-52709c6c8bb5bb00981a4ed7fa10195c32573ea9.tar.gz |
rewrite the item.respond_to?(:x?) && item.x? to item.try(:x?)
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index a8a49e43b05..47c7d2ebbec 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -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' |