Remove helper
This commit is contained in:
parent
deb56f21cb
commit
c0af1fc4be
|
@ -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
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue