I'm using shallow nesting in Rails, similar to the example here
My routes.rb is configured with:
resources :applications do
resources :domains, shallow: true
end
I have used rails scaffold to generate both models and associations, in order to add new domain to application, I can get there via
option #1
/domains/new
option #2 via its parent resource
/applications/:application_id/domains/new
Currently the form displays drop down to associate domain with its parent upon creation.
How can I hide this dropdown menu option if user get to the form via option 2 and display if if user get to the form via option 1?
Your thoughts is highly appreciated.
Thanks
