I’d like to ignore the inherited prefix from Phoenix.Router.resources and Phoenix.Router.scope when I define a route for its own generated path/url helpers (because they are injected by a macro). Is it possible? How could I achieve this?
scope "/foo", as: :foo do resources "/bar", MyAppWeb.BarController, only: ~W[new create]a, as: :name end
Will generate the helper
foo_name_path but I’d like to get
name_path instead, by ignoring/getting rid of the inherited
foo part (to be clear: in my real case, I can’t change the
scope is defined by the user but
resources is injected by a macro). Maybe my approach is inadequate? Have I miss some point in Phoenix.Router’s documentation?
Many thanks if you have a solution or a lead.