In Rails you can use nested routes to create RESTful routes for has_one and has_many relationships. Examples can be found on the Rails Guides
I'd like to ask if there is a good way to configure RESTful routes for habtm relationships? For example if I have a relationship A-habtm-B, my idea is to configure nested routes for A has_many B, and nested routes for B has_many A. Would that work? Or is there a better way?