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
Léo-Paul Géneau
gitlab-ce
Commits
c0af1fc4
Commit
c0af1fc4
authored
Apr 13, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove helper
parent
deb56f21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+0
-4
app/serializers/status_entity.rb
app/serializers/status_entity.rb
+3
-2
No files found.
app/helpers/ci_status_helper.rb
View file @
c0af1fc4
...
...
@@ -121,8 +121,4 @@ module CiStatusHelper
status
.
respond_to?
(
:label
)
&&
status
.
respond_to?
(
:icon
)
end
def
ci_status_favicon_path
(
favicon_name
)
ActionController
::
Base
.
helpers
.
image_path
(
File
.
join
(
'ci_favicons'
,
"
#{
favicon_name
}
.ico"
))
end
end
app/serializers/status_entity.rb
View file @
c0af1fc4
class
StatusEntity
<
Grape
::
Entity
include
RequestAwareEntity
include
CiStatusHelper
format_with
(
:status_favicon_path
)
do
|
favicon_name
|
ci_status_favicon_path
(
favicon_name
)
...
...
@@ -11,5 +10,7 @@ class StatusEntity < Grape::Entity
expose
:has_details?
,
as: :has_details
expose
:details_path
expose
:favicon
,
format_with: :status_favicon_path
expose
:favicon
do
|
status
|
ActionController
::
Base
.
helpers
.
image_path
(
File
.
join
(
'ci_favicons'
,
"
#{
status
.
favicon
}
.ico"
))
end
end
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