Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
52709c6c
Commit
52709c6c
authored
Jan 03, 2017
by
dimitrieh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite the item.respond_to?(:x?) && item.x? to item.try(:x?)
parent
de25604f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+3
-3
No files found.
app/helpers/issues_helper.rb
View file @
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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment