Tuesday, June 24th, 2008
Organize Nested Resource Controllers More Efficiently in Rails
Nested resources are awesome. If you want to have a blog with entries that have comments, the resources are dead simple:
map.resources :entries do |entry| entry.resources :comments end
Awesome, now you have set up paths like entries/3/ and entries/3/comments/ using an EntriesController and a CommentsController. What if, however, you want to have a base comments [...]