jsierles/js_named_routes — Issue #1: Routing.root_path() is "" when it should be "/"
Author: glennfu
Created: 2011-10-25 19:54:09+00:00
State: open

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?