Skip to content

Routing.root_path() is "" when it should be "/" #1

Description

@glennfu

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions