diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-04-13 21:40:32 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2018-06-05 16:20:23 +0200 |
commit | 9151aed773fb32363abbae2fb7a06610915cf882 (patch) | |
tree | 181e2f458c1f38e8d0f12208544afc6cd6889792 /lib | |
parent | b606636eab1d9beb0331703dfca7399bba111f46 (diff) | |
download | gitlab-ce-9151aed773fb32363abbae2fb7a06610915cf882.tar.gz |
dry up asset path helper calls
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/favicon.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/gitlab/favicon.rb b/lib/gitlab/favicon.rb index d554d100ad1..451c9daf761 100644 --- a/lib/gitlab/favicon.rb +++ b/lib/gitlab/favicon.rb @@ -3,10 +3,17 @@ module Gitlab class << self def main return appearance_favicon.favicon_main.url if appearance_favicon.exists? - return ActionController::Base.helpers.image_path('favicon-yellow.png') if Gitlab::Utils.to_boolean(ENV['CANARY']) - return ActionController::Base.helpers.image_path('favicon-blue.png') if Rails.env.development? - ActionController::Base.helpers.image_path('favicon.png') + image_name = + if Gitlab::Utils.to_boolean(ENV['CANARY']) + 'favicon-yellow.png' + elsif Rails.env.development? + 'favicon-blue.png' + else + 'favicon.png' + end + + ActionController::Base.helpers.image_path(image_name) end def status_overlay(status_name) |