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

Commit 91a9635

Browse files
committed
Fix generating javascript tag using requirejs_include_tag with Rails.application.config.relative_url_root set
1 parent 749a12e commit 91a9635

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/helpers/requirejs_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def requirejs_include_tag(name = nil, &block)
2929

3030
once_guard do
3131
rjs_attributes = {
32-
src: javascript_path("require")
32+
src: path_to_javascript("require")
3333
}
3434

3535
rjs_attributes = rjs_attributes.merge(Hash[block.call(controller).map do |key, value|
@@ -66,7 +66,7 @@ def requirejs_include_tag(name = nil, &block)
6666
module_name
6767
end
6868

69-
paths[module_name] = javascript_path(script_path).gsub(/\.js$/, "")
69+
paths[module_name] = path_to_javascript(script_path).gsub(/\.js$/, "")
7070
end
7171

7272
if run_config.has_key? "paths"

0 commit comments

Comments
 (0)