[Patch] Change for nested resources
Reported by Shay Arnett | February 29th, 2008 @ 06:30 PM | in 0.9
This patch fixes a problem where resources couldn't be nested under more than 1 parent. For example you couldn't previously do
r.resources :foos do |f|
f.resources :bars
end
r.resources :chips do |c|
c.resources :bars
end
The last nesting would overwrite the named routes that the first one created. Rendering it impossible to use the named routes with url().
The named routes produced after the patch will be like:
:foo_bars
:chip_bars
:new_foo_bar
:new_chip_bar
:edit_foo_bar
:edit_chip_bar
etc...
Comments and changes to this ticket
-
Shay Arnett February 29th, 2008 @ 06:56 PM
- → Assigned user changed from to Michael D. Ivey (ivey)
- → State changed from new to open
-
-
Shay Arnett February 29th, 2008 @ 07:51 PM
Updated patch to handle resources nested under multiple levels aka
r.resources :foos do |f|
f.resources :bars do |b|
b.resources :bazs
end
end
-
Yehuda Katz (wycats) February 29th, 2008 @ 11:16 PM
- → Milestone changed from to 0.9
- → State changed from open to resolved
closed in commit f66745664c774ed84b9a3a7740290dbf6ef338d5
-
-
Shay Arnett March 1st, 2008 @ 12:26 AM
- → State changed from resolved to open
-
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
