Skip to content

Commit

Permalink
always rewrite_relative_url_root
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Sep 13, 2011
1 parent f1c3903 commit 5bad79d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/asset_paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def compute_public_path(source, dir, ext = nil, include_host = true, protocol =

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
Expand Down
6 changes: 1 addition & 5 deletions actionpack/lib/sprockets/helpers/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,7 @@ class AssetPaths < ::ActionView::AssetPaths #:nodoc:
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
Expand Down

0 comments on commit 5bad79d

Please sign in to comment.