Remove helper

This commit is contained in:
Luke "Jared" Bennett 2017-04-13 12:14:31 +01:00
parent deb56f21cb
commit c0af1fc4be
No known key found for this signature in database
GPG Key ID: 402ED51FB5D306C2
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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