1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix asset_path relative_url_root method

This commit is contained in:
Santiago Pastorino 2011-09-13 02:45:05 -07:00
parent 60fd88d2f7
commit ae04fbfee9
2 changed files with 5 additions and 7 deletions

View file

@ -119,10 +119,12 @@ module ActionView
end
def relative_url_root
config = controller.config if controller.respond_to?(:config)
config ||= config.action_controller if config.action_controller.present?
if config.action_controller.present?
config.action_controller.relative_url_root
else
config.relative_url_root
end
end
def asset_host_config
if config.action_controller.present?

View file

@ -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