In my router I have nested two ressources:
resources :servers do
member do
resources :maintenances
end
end
which results in URI pattern as follows:
maintenance GET /servers/:id/maintenances/:id(.:format) maintenances#show
In maintenance_controller's show action I want to get these IDs like:
@server = Server.find_by(params[:id])
@maintenance = Maintenance.find_by ???
My Question is: How can I access these two IDs in my maintenance_controller from the URI pattern http://localhost/servers/1/maintenances/1