diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-09-13 02:45:05 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-09-13 02:45:05 -0700 |
commit | ae04fbfee961a7e6b90a3373dc305f100e50614f (patch) | |
tree | 7d92b4f02c3d07672a20c6ec970c5956aa60ca21 /actionpack | |
parent | 60fd88d2f763eab11a7589227757a50028084068 (diff) | |
download | rails-ae04fbfee961a7e6b90a3373dc305f100e50614f.tar.gz rails-ae04fbfee961a7e6b90a3373dc305f100e50614f.tar.bz2 rails-ae04fbfee961a7e6b90a3373dc305f100e50614f.zip |
Fix asset_path relative_url_root method
Diffstat (limited to 'actionpack')
-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 |