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

Fix generating javascript tag using with Rails.application.config.relative_url_root set #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/helpers/requirejs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def requirejs_include_tag(name = nil, &block)

once_guard do
rjs_attributes = {
src: javascript_path("require")
src: path_to_javascript("require")
}

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

paths[module_name] = javascript_path(script_path).gsub(/\.js$/, "")
paths[module_name] = path_to_javascript(script_path).gsub(/\.js$/, "")
end

if run_config.has_key? "paths"
Expand Down