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
1 changed files with 6 additions and 1 deletions

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