aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_view/asset_paths.rb2
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb6
2 files changed, 2 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/asset_paths.rb b/actionpack/lib/action_view/asset_paths.rb
index 1d968fc798..9c1c821f8f 100644
--- a/actionpack/lib/action_view/asset_paths.rb
+++ b/actionpack/lib/action_view/asset_paths.rb
@@ -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
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 7d9296fa90..f9135d43d2 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -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