Do not rely on rails env to detect staging

This commit is contained in:
Paul Chavard 2018-08-21 15:43:06 +02:00
parent ebc7044743
commit f4f3a302b9
3 changed files with 6 additions and 2 deletions

View file

@ -50,6 +50,10 @@ module ApplicationHelper
current_administrateur&.email
end
def staging?
ENV['APP_NAME'] == 'tps_dev'
end
def root_path_for_profile(nav_bar_profile)
case nav_bar_profile
when :gestionnaire

View file

@ -23,7 +23,7 @@
%body
= render partial: 'layouts/support_navigator_banner'
= render partial: 'layouts/pre_maintenance'
- if Rails.env == 'staging'
- if staging?
#beta
Env Test

View file

@ -29,7 +29,7 @@
.page-wrapper
= render partial: "layouts/support_navigator_banner"
= render partial: 'layouts/pre_maintenance'
- if Rails.env == "staging"
- if staging?
#beta
Env Test