Hey, everybody.
I feel like I'm spinning my wheels trying to understand particular
elements of REST.
I've read many blogs and tutorials, watched the PeepCode REST
screencast, and I've learned a lot, but it seems like the more
advanced topics are kind of glossed over.
For instance, resources nested in multiple associations (or
singularly) was demonstrated, but no code was built to prove the
concept. I just saw how you got the fancy routes.
Here's what I mean. In routes.rb, you've got:
# ...
map.resources :programs do |programs|
programs.resources :tags, :name_prefix => "programs_"
end
map.resources :episodes do |episodes|
episodes.resources :tags, :name_prefix => "episodes_
end
map.resources :tags
# ...
Glancing at this, I can't imagine how I could begin elegantly crafting
TagsController.
Am I looking at this all wrong? Thanks in advance.
Derek