[ENV] Configure default_url_options
This commit is contained in:
parent
bd574b21f6
commit
c79827d551
3 changed files with 11 additions and 12 deletions
|
@ -24,11 +24,6 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
end
|
||||
|
||||
def default_url_options
|
||||
return { protocol: 'https' } if Rails.env.staging? || Rails.env.production?
|
||||
{}
|
||||
end
|
||||
|
||||
def load_navbar_left_pannel_partial_url
|
||||
controller = request.controller_class
|
||||
method = params[:action]
|
||||
|
|
|
@ -47,17 +47,15 @@ Rails.application.configure do
|
|||
# Action Mailer settings
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
||||
config.action_mailer.asset_host = 'http://localhost:3000'
|
||||
# Config for mailcatcher https://mailcatcher.me/
|
||||
config.action_mailer.smtp_settings = {
|
||||
:address => "localhost",
|
||||
:port => 1025,
|
||||
:locale => 'fr'
|
||||
address: 'localhost',
|
||||
port: 1025,
|
||||
locale: 'fr'
|
||||
}
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: 'localhost:3000',
|
||||
protocol: :http
|
||||
host: 'localhost:3000'
|
||||
}
|
||||
|
||||
# Raises error for missing translations
|
||||
|
|
|
@ -81,6 +81,11 @@ Rails.application.configure do
|
|||
config.action_mailer.delivery_method = :mailjet
|
||||
end
|
||||
|
||||
config.action_mailer.default_url_options = {
|
||||
protocol: :https,
|
||||
host: ENV['APP_HOST']
|
||||
}
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
@ -97,6 +102,7 @@ Rails.application.configure do
|
|||
config.active_record.dump_schema_after_migration = false
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
protocol: :https
|
||||
protocol: :https,
|
||||
host: ENV['APP_HOST']
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue