brecabral

brecabral

Documentation

While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explaining what the problem is.

I looked at the history of this section and found that an older version of the documentation contained an explanation immediately after this part. It said:

“We can fix this problem by adding an as: :admin option to our admin scope:”

followed by:

scope "/admin", HelloWeb.Admin, as: :admin do
  pipe_through :browser

  resources "/reviews", ReviewController
end

From the older documentation, it appears that the problem being referred to was the generated path helpers having the same name, such as review_path.

My question is whether this problem still exists in the current Phoenix version.

If it has been resolved at some point, should the current documentation still mention “but there is a problem”, or should that statement be removed/updated?

Marked As Solved

rhcarvalho

rhcarvalho

Hi Breno, welcome to the Elixir community and the Forum!

Indeed, in Phoenix 1.7+, route helpers were replaced with Verified Routes (e.g. ~p"/reviews"), making helper name collisions irrelevant. That transition sentence ("This looks good, but there is a problem here...") was accidentally left behind without the original context explaining helper name collisions.

I’m sure a docs PR would be very welcome.

If you haven’t figured it out yet, the documentation has links that take you directly to the source code:

The particular sentence is still there in main:

Also Liked

josevalim

josevalim

Creator of Elixir

It has been resolved since path helpers are deprecated. It seems it is already no longer there on more recent versions of the documentation!

brecabral

brecabral OP

Thanks for the explanation! I opened a PR to remove the outdated statement: PR link

Hope it helps with the project!

brecabral

brecabral OP

Wow, first of all, I didn’t expect to get a response from José Valim himself. Thanks!

Second, I just started learning Elixir/Phoenix, so I’m going through the documentation. When I read “but there is a problem”, I started looking for an explanation and a solution to that problem.

The guide at /main/guides/routing.md on line 321, still has the same text.

Maybe I’m just misunderstanding what you mean — English isn’t my native language — but is the problem you were referring to something else? For example, is it about having both the admin routes and the regular user-facing routes?

Because that is actually the behavior I would expect, and I don’t see it as a problem. Or there is a even more recent versions of the documentation?

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews