-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disjonction host url for mailers depending on environment
- Loading branch information
1 parent
304d82a
commit 03db348
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
class APIEntrepriseMailer < ApplicationMailer | ||
default from: 'support@entreprise.api.gouv.fr' | ||
default_url_options[:host] = 'https://entreprise.api.gouv.fr' | ||
|
||
default_url_options[:host] = if Rails.env.sandbox? || Rails.env.staging? | ||
"https://#{Rails.env}.entreprise.api.gouv.fr" | ||
else | ||
'https://entreprise.api.gouv.fr' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
class APIParticulierMailer < ApplicationMailer | ||
default from: 'support@particulier.api.gouv.fr' | ||
default_url_options[:host] = 'https://particulier.api.gouv.fr' | ||
|
||
default_url_options[:host] = if Rails.env.sandbox? || Rails.env.staging? | ||
"https://#{Rails.env}.particulier.api.gouv.fr" | ||
else | ||
'https://particulier.api.gouv.fr' | ||
end | ||
end |