From f448ae920fbb6c5613a625c424c11bef9f72f359 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Fri, 4 Aug 2017 15:53:07 -0400 Subject: [PATCH 1/2] Set default URL options **Why**: It's a best practice to define the host for assets and URLs, just like we do for mailers. --- config/environments/production.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/environments/production.rb b/config/environments/production.rb index db18fb995e8..54d8bdfd26b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -2,6 +2,8 @@ config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false + config.action_controller.asset_host = Figaro.env.domain_name + config.action_controller.default_url_options = { host: Figaro.env.domain_name } config.action_controller.perform_caching = true config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? config.assets.js_compressor = :uglifier From 995795f7169d94047b910b7f6ecc817d2f4c98f2 Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Mon, 7 Aug 2017 11:44:52 -0400 Subject: [PATCH 2/2] Fix Rubocop spacing issue --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 54d8bdfd26b..b5e81fb00a3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,7 +1,7 @@ Rails.application.configure do config.cache_classes = true config.eager_load = true - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.asset_host = Figaro.env.domain_name config.action_controller.default_url_options = { host: Figaro.env.domain_name } config.action_controller.perform_caching = true