Skip to content

URL, in templates, cannot reference non-handler route definitions #242

@igbanam

Description

@igbanam

With this root routes file

Marten.routes.draw do
  path "/nested-app", NestedApp::ROUTES, name: "nested_app"
end

A template file cannot reference this route using {% url "nested_app" %}. However, if it points to a handler, like in the example below

Marten.routes.draw do
  path "/nested-app", NestedApp::ROUTES, name: "nested_app"
  path "/direct-to-handler", DirectHandler, name: "direct"
end

Then {% url "direct" %} properly compiles into "/direct-to-handler".

I expect that with the nested routes, the same behaviour should hold?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions