summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/helpers/ci_status_helper.rb4
-rw-r--r--app/serializers/status_entity.rb5
2 files changed, 3 insertions, 6 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb
index b05662bc33d..2de9e0de310 100644
--- a/app/helpers/ci_status_helper.rb
+++ b/app/helpers/ci_status_helper.rb
@@ -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
diff --git a/app/serializers/status_entity.rb b/app/serializers/status_entity.rb
index 8aa894f9fee..6862730d9d2 100644
--- a/app/serializers/status_entity.rb
+++ b/app/serializers/status_entity.rb
@@ -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