This project is archived and is in readonly mode.
routes => :except being inherited by sub-level resources
Reported by Rafael Barbosa | July 5th, 2010 @ 04:09 PM
This route declaration
resources :artists, :except => [:new,:create] do
resources :releases do
resources :tracks
end
end
Supresses the :new and :create routes for releases and tracks too. To put them back in I had to:
resources :artists, :except => [:new,:create] do
resources :releases, :except => [:none] do
resources :tracks
end
end
Which seems odd. Is this the new expected behavior?
Comments and changes to this ticket
-
Tatsuro BABA July 6th, 2010 @ 04:30 AM
+1 I just encountered exactly the same problem.
So, attached a patch with failing test cases. -
Repository July 6th, 2010 @ 08:06 PM
- State changed from new to resolved
(from [f4be0041c605daad2406ec41fa7dfa4388af5f31]) Refactor handling of :only and :except options. The rules are:
- Don't inherit when specified as an option on a
resource
- Don't push into scope when specified as an option on a
resource
- Resources pull in :only or :except options from scope
- Either :only or :except in nested scope overwrites parent scope
[#5048 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/f4be0041c605daad2406ec41fa7dfa...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 5048 routes => :except being inherited by sub-level resources [#5048 state:resolved]