diff options
-rw-r--r-- | actionpack/lib/action_view/asset_paths.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/lib/action_view/asset_paths.rb b/actionpack/lib/action_view/asset_paths.rb index 9c1c821f8f..75164b8134 100644 --- a/actionpack/lib/action_view/asset_paths.rb +++ b/actionpack/lib/action_view/asset_paths.rb @@ -119,9 +119,11 @@ module ActionView end def relative_url_root - config = controller.config if controller.respond_to?(:config) - config ||= config.action_controller if config.action_controller.present? - config.relative_url_root + if config.action_controller.present? + config.action_controller.relative_url_root + else + config.relative_url_root + end end def asset_host_config diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb index 5785da5124..998f0bceb7 100644 --- a/actionpack/lib/sprockets/helpers/rails_helper.rb +++ b/actionpack/lib/sprockets/helpers/rails_helper.rb @@ -149,10 +149,6 @@ module Sprockets source end end - - def relative_url_root - has_request? ? super : config.action_controller.relative_url_root - end end end end |