Skip to content
Browse files

always rewrite_relative_url_root

  • Loading branch information...
1 parent c289dea commit f79fac502904370057be20029acc8e4bb17df000 @spastorino spastorino committed Sep 13, 2011
Showing with 2 additions and 6 deletions.
  1. +1 −1 actionpack/lib/action_view/asset_paths.rb
  2. +1 −5 actionpack/lib/sprockets/helpers/rails_helper.rb
View
2 actionpack/lib/action_view/asset_paths.rb
@@ -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
View
6 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -108,11 +108,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

0 comments on commit f79fac5

Please sign in to comment.
Something went wrong with that request. Please try again.