From 5266eb9f611a114663c48eec0680b7050181d3de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Oko=C5=84ski?= Date: Mon, 12 Dec 2011 16:52:56 +0100 Subject: Default relative_url_root to ENV["RAILS_RELATIVE_URL_ROOT"]. Fixes #3365 --- actionpack/lib/abstract_controller/asset_paths.rb | 2 +- actionpack/lib/action_controller/railtie.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/abstract_controller/asset_paths.rb b/actionpack/lib/abstract_controller/asset_paths.rb index c2a6809f58..dd5f9a1942 100644 --- a/actionpack/lib/abstract_controller/asset_paths.rb +++ b/actionpack/lib/abstract_controller/asset_paths.rb @@ -4,7 +4,7 @@ module AbstractController included do config_accessor :asset_host, :asset_path, :assets_dir, :javascripts_dir, - :stylesheets_dir, :default_asset_host_protocol + :stylesheets_dir, :default_asset_host_protocol, :relative_url_root end end end diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index de7b837ecc..cb2e2b17aa 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -31,6 +31,7 @@ module ActionController # make sure readers methods get compiled options.asset_path ||= app.config.asset_path options.asset_host ||= app.config.asset_host + options.relative_url_root ||= app.config.relative_url_root ActiveSupport.on_load(:action_controller) do include app.routes.mounted_helpers -- cgit v1.2.3