I have a nested restful resource working
map.resources :works do |work|
producing a url like:
I’d like to do two things with the URL, but am not sure where to start.
I’d like to restrict the work_section from displaying if the work_id
Right now /works/2/work_sections/1 will pull up work_section_id 1 even
is associated with work_id 1 (contrary to the url)
Make it so that the work_section number in the URL is the :position
opposed to :id) for the work_section which is an acts_as_list child of
I want to avoid ending up with a url like:
I’m pretty sure accomplishing #2 will include my want for #1.
Is there an example or particular concept I need to look to research how
do this type of routing?
Rich VÃ¡zquez, CISSP, CISA