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:
parent
60fd88d2f7
commit
ae04fbfee9
2 changed files with 5 additions and 7 deletions
|
@ -119,9 +119,11 @@ module ActionView
|
||||||
end
|
end
|
||||||
|
|
||||||
def relative_url_root
|
def relative_url_root
|
||||||
config = controller.config if controller.respond_to?(:config)
|
if config.action_controller.present?
|
||||||
config ||= config.action_controller if config.action_controller.present?
|
config.action_controller.relative_url_root
|
||||||
config.relative_url_root
|
else
|
||||||
|
config.relative_url_root
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def asset_host_config
|
def asset_host_config
|
||||||
|
|
|
@ -149,10 +149,6 @@ module Sprockets
|
||||||
source
|
source
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def relative_url_root
|
|
||||||
has_request? ? super : config.action_controller.relative_url_root
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue