Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit adcc1e6

Browse files
committed
Merge pull request #146 from uswitch/master
supports rails' relative_url when building baseUrl for requirejs
2 parents fbc1e5c + 0703580 commit adcc1e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers/requirejs_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,6 @@ def baseUrl(js_asset)
9999
js_asset_path = javascript_path(js_asset)
100100
uri = URI.parse(js_asset_path)
101101
asset_host = uri.host && js_asset_path.sub(uri.request_uri, '')
102-
[asset_host, Rails.application.config.assets.prefix].join
102+
[asset_host, Rails.application.config.relative_url_root, Rails.application.config.assets.prefix].join
103103
end
104104
end

0 commit comments

Comments
 (0)