mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
added current env style
This commit is contained in:
parent
5ddb7ff268
commit
0444b75fee
6 changed files with 23 additions and 10 deletions
|
@ -1,2 +1,16 @@
|
|||
module ApplicationHelper
|
||||
def current_env
|
||||
if request.host == 'registry.gitlab.eu'
|
||||
:alpha
|
||||
elsif request.host == 'testepp.internet.ee'
|
||||
:staging
|
||||
elsif Rails.env.development?
|
||||
:development
|
||||
end
|
||||
end
|
||||
|
||||
def env_style
|
||||
return '' if current_env.nil?
|
||||
"background-image: url(#{image_path(current_env.to_s + '.png')});"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue