Commit c0af1fc4 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Remove helper

parent deb56f21
...@@ -121,8 +121,4 @@ module CiStatusHelper ...@@ -121,8 +121,4 @@ module CiStatusHelper
status.respond_to?(:label) && status.respond_to?(:label) &&
status.respond_to?(:icon) status.respond_to?(:icon)
end end
def ci_status_favicon_path(favicon_name)
ActionController::Base.helpers.image_path(File.join('ci_favicons', "#{favicon_name}.ico"))
end
end end
class StatusEntity < Grape::Entity class StatusEntity < Grape::Entity
include RequestAwareEntity include RequestAwareEntity
include CiStatusHelper
format_with(:status_favicon_path) do |favicon_name| format_with(:status_favicon_path) do |favicon_name|
ci_status_favicon_path(favicon_name) ci_status_favicon_path(favicon_name)
...@@ -11,5 +10,7 @@ class StatusEntity < Grape::Entity ...@@ -11,5 +10,7 @@ class StatusEntity < Grape::Entity
expose :has_details?, as: :has_details expose :has_details?, as: :has_details
expose :details_path 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 end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment