I have the following nested route in my routes.rb
map.resources :users do |user|
user.resources :pie_charts
end
and the 'rake routes' command shows the following routes:
user_pie_charts GET /users/:user_id/pie_charts(.:format)
{:controller=>"pie_charts", :action=>"index"}
user_pie_chart GET /users/:user_id/pie_charts/:id(.:format)
{:controller=>"pie_charts", :action=>"show"}
This all works, but I want the URLs to omit "/users," that is:
user_pie_charts GET /:user_id/pie_charts(.:format)
user_pie_chart GET /:user_id/pie_charts/:id(.:format)
Is this possible, and if so how would one go about configuring it?
- Steve W.
--
Posted via http://www.ruby-forum.com/.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.