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

always rewrite_relative_url_root

This commit is contained in:
Santiago Pastorino 2011-09-13 00:27:29 -07:00
parent f1c3903f5c
commit 5bad79d930
2 changed files with 2 additions and 6 deletions

View file

@ -27,7 +27,7 @@ module ActionView
source = rewrite_extension(source, dir, ext) if ext
source = rewrite_asset_path(source, dir)
source = rewrite_relative_url_root(source, relative_url_root) if has_request?
source = rewrite_relative_url_root(source, relative_url_root)
source = rewrite_host_and_protocol(source, protocol) if include_host
source
end

View file

@ -103,11 +103,7 @@ module Sprockets
class AssetNotPrecompiledError < StandardError; end
def compute_public_path(source, dir, ext = nil, include_host = true, protocol = nil)
public_path = super(source, asset_prefix, ext, include_host, protocol)
if !is_uri?(public_path) && relative_url_root
public_path = rewrite_relative_url_root(public_path, relative_url_root)
end
public_path
super(source, asset_prefix, ext, include_host, protocol)
end
# Return the filesystem path for the source