So I have four models, A, B, C, and D that I associate with has_many and belong_to. I want to have a nested route formation for D.
D belongs_to A, B and C and there is no case that it can be otherwise. However when creating a nested resource for this route I am doing:
resources :A do
resources :B do
resources :C do
resources :D
end
end
end
Now this creates the url I want, but I don't need any of the resources from B and C creating under this formation. So I will never have a new_A_B_path call anywhere in my code. All I want is to know A, B and C when I'm creating or editing a new D.
What is the right way to handle this?