From 3dd3f43b24af4f72b1b8aa64cac441b92b9e2ea4 Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Thu, 9 Feb 2017 11:28:11 -0500 Subject: [PATCH] serve fa assets from relative root --- app/views/layouts/application.html.erb | 5 +++++ config/environments/production.rb | 2 ++ 2 files changed, 7 insertions(+) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index fb6dfd07..58ff0dca 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -21,6 +21,11 @@ with BigBlueButton; if not, see . + <% if relative_root != '/b' %> + + <% else %> + <%= stylesheet_link_tag 'fa/gl-fa', media: 'all', 'data-turbolinks-track': 'reload' %> + <% end %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> diff --git a/config/environments/production.rb b/config/environments/production.rb index 7ccf92cc..cd23b595 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -87,4 +87,6 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] || '/b' end