Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2018-04-13 22:40:32 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2018-06-05 17:20:23 +0300
commit9151aed773fb32363abbae2fb7a06610915cf882 (patch)
tree181e2f458c1f38e8d0f12208544afc6cd6889792 /lib/gitlab/favicon.rb
parentb606636eab1d9beb0331703dfca7399bba111f46 (diff)
dry up asset path helper calls
Diffstat (limited to 'lib/gitlab/favicon.rb')
-rw-r--r--lib/gitlab/favicon.rb13
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)