ajout du nom d'application tot au demarrage
The application name is used in the views, but also in the initializers and in the config/ directory According to rails doc (https://guides.rubyonrails.org/v6.0/configuring.html#locations-for-initialization-code), if we want to do some things before the initializers and the environment, the only place to do so is in config/application.rb
This commit is contained in:
parent
fb3e69aa2a
commit
3340a2b091
3 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
require File.expand_path('boot', __dir__)
|
require File.expand_path('boot', __dir__)
|
||||||
|
|
||||||
require 'rails/all'
|
require 'rails/all'
|
||||||
|
require_relative 'application_name'
|
||||||
|
|
||||||
# Require the gems listed in Gemfile, including any gems
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
|
|
3
config/application_name.rb
Normal file
3
config/application_name.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
APPLICATION_NAME = ENV.fetch("APPLICATION_NAME", "demarches-simplifiees.fr")
|
||||||
|
APPLICATION_SHORTNAME = ENV.fetch("APPLICATION_SHORTNAME", "d-s.fr")
|
||||||
|
APPLICATION_BASE_URL = ENV.fetch("APPLICATION_BASE_URL", "https://www.demarches-simplifiees.fr")
|
|
@ -10,6 +10,11 @@ APP_NAME="tps_local"
|
||||||
# * pour de la prod: www.demarches-simplifiees.fr
|
# * pour de la prod: www.demarches-simplifiees.fr
|
||||||
APP_HOST="localhost:3000"
|
APP_HOST="localhost:3000"
|
||||||
|
|
||||||
|
# Les paramètres pour l'affichage du nom l'application, et pour la génération des liens
|
||||||
|
APPLICATION_NAME="demarches-simplifiees.fr"
|
||||||
|
APPLICATION_SHORTNAME="d-s.fr"
|
||||||
|
APPLICATION_BASE_URL="https://www.demarches-simplifiees.fr"
|
||||||
|
|
||||||
# Utilisé pour les logs LogRage
|
# Utilisé pour les logs LogRage
|
||||||
SOURCE="tps_local"
|
SOURCE="tps_local"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue