[Rails] Rails 3 Routes
Hi everyone,
I have a nested resource that is generating the route: /events/id/
registrations.json
However, I would like to know if I can do something like this: /events/
registrations.json
With that said I have three questions:
1) If I can do that, would the events id still be passed and give me
access to the proper registrations related to the event?
2) How does this look in my routes file?
3) Would there need to be a change in my controllers?
You may find the code I am working with at: github.com/TheCodeBoutique/
Nested-Resource-Demo
Kind Regards,
Chad Eubanks
The Code Boutique
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home