Hi,
I am writing an application with nested resources. I have a resource
called Facilities which has_many Reservations.
map.resources :facilities do |facilities|
facilities.resources :reservations
end
I have thus urls like
/facilities/1/reservations
/facilities/1/reservations/4
I have the possibility to show a list of all reservations - the index action, and a particular reservation - the
show action. How do I list all reservations between 10. April 10:00 and
12. April 20:00 ?
How do I list ranges in RESTful resources?
Cheers,
evgeni
Hi Gerjan,
thank you for your proposal. Sounds really
streightforward. Is this approach along the RESTful lines? I have read
the following discussion:
http://groups.google.ca/group/rubyonrails-talk/browse_thread/thread/e1759be395695179/2cd53b5742b7bec2
I have been thinking about my problem for a couple of days now and I
still think there should be a simpler solution. Maybe ranges should be
treated as another resource. But then they share the same set of data
with the index action. Sounds like a "2 Controller-one Model-thing" DHH
was talking on the Eurocon about. Hmm ...
Cheers,
evgeni