I'm using Rails 3 and I have two models EquipmentGroup and Reservation. I want reservations to be a nested resource of equipment groups so that I can access them with URLs like:
/equipment_groups/:equipment_group_id/reservations/:id
However, I don't want to create routes for the equipment groups. I can achieve this through the following, but it seems like a hack:
resources :equipment_groups, :only => [] do
resources :reservations
end
Is there a better way to do this? I can't seem to find an answer easily in the documentation.