diff --git a/config/environments/development.rb b/config/environments/development.rb index 1512c020b..c6f75a1c6 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -57,7 +57,7 @@ # config.action_view.annotate_rendered_view_with_filenames = true # Provide a default host for URLs - Rails.application.routes.default_url_options[:host] = ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') + config.routes.default_url_options[:host] = ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') config.action_controller.default_url_options = Rails.application.routes.default_url_options config.action_mailer.default_url_options = Rails.application.routes.default_url_options diff --git a/config/environments/production.rb b/config/environments/production.rb index 59431a74d..e1d230372 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -115,7 +115,7 @@ end # Provide a default host for URLs - Rails.application.routes.default_url_options[:host] = ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') + config.routes.default_url_options[:host] = ENV.fetch('OSEM_HOSTNAME', 'localhost:3000') config.action_controller.default_url_options = Rails.application.routes.default_url_options config.action_mailer.default_url_options = Rails.application.routes.default_url_options diff --git a/config/environments/test.rb b/config/environments/test.rb index a7723d22d..402118b92 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -44,7 +44,7 @@ config.active_support.disallowed_deprecation_warnings = [] # Provide a default host for URLs - Rails.application.routes.default_url_options[:host] = 'localhost:3000' + config.routes.default_url_options[:host] = 'localhost:3000' config.action_controller.default_url_options = Rails.application.routes.default_url_options config.action_mailer.default_url_options = Rails.application.routes.default_url_options