Added canary conditional to status_entity.rb

This commit is contained in:
Luke "Jared" Bennett 2017-06-27 12:57:05 +01:00
parent ed31624970
commit 8887c2457f
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2

View file

@ -8,7 +8,12 @@ class StatusEntity < Grape::Entity
expose :favicon do |status|
dir = 'ci_favicons'
dir = File.join(dir, 'dev') if Rails.env.development?
if ENV['CANARY']
dir = File.join(dir, 'canary')
elsif Rails.env.development?
dir = File.join(dir, 'dev')
end
ActionController::Base.helpers.image_path(File.join(dir, "#{status.favicon}.ico"))
end