diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-13 12:14:31 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-13 12:14:31 +0100 |
commit | c0af1fc4be9df47656d1859de18e18a85c1080a5 (patch) | |
tree | fcf7f0a11a7cc30b3b412ae29be9bdcdaa19db66 | |
parent | deb56f21cb5fc7ef9292d4307bc1618af0c1cb29 (diff) | |
download | gitlab-ce-c0af1fc4be9df47656d1859de18e18a85c1080a5.tar.gz |
Remove helper
-rw-r--r-- | app/helpers/ci_status_helper.rb | 4 | ||||
-rw-r--r-- | app/serializers/status_entity.rb | 5 |
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 |