Reputation: 1567
Lets say I have a structure, such as the below:
Doctor has_many :appointments
Patient has_many :appointments
doctors has_many :patients :through :appointments
patients has_many :doctors :through :appointments
Can I nest appointments under doctors? Will this cause any limitations or is it against best practices?
Upvotes: 1
Views: 349
Reputation: 10738
Nested routes will only affect the way you access the resources. There will not be any limitation at the Model level due to how you chose to organize the routes. If it makes sense in the context of your application there is no reason not to do it.
Upvotes: 2