js_named_routes
js_named_routes copied to clipboard
Routing.root_path() is "" when it should be "/"
In my console:
>> include ActionController::UrlWriter
=> Object
>> root_path
=> "/"
In the javascript console:
>>> Routing.root_path()
""
Changing generate.js.erb to:
while (path[path.length - 1] == "/" && path != "/") {
fixes it. Does that look right?
At a glance, yes, that looks right to me. Pull request?