Nested resources in Ruby on Rails: why bother?

Nested resources in Ruby on Rails are sort of neat, but they are a pain to implement. What’s more, I have to ask myself, why bother?

If a resource has a unique identifier id, then why would you need to call its parent resource to call it? The unique identifier is enough. And what resource doesn’t have a unique id these days?

One Reply to “Nested resources in Ruby on Rails: why bother?”

  1. umm, you might want one form (say user details) which multiple addresses, and want that all the be handled by the same form. ie have an add address link and a remove address link.

    or allow adding teams to a user inline. I’ve used nested resources heaps.

Leave a Reply

Your email address will not be published. Required fields are marked *