Hello-
I’m creating an app where someone can register for an event. They can
only register for one event at a time (the events are all concurrently
scheduled). I have an event model that has a vanialla model and
resource. I created a Reservation model and set it up as a singleton
resource so I can view the current Reservation at something like:
http://www.example.com/reservation
And I can edit it at:
http://www.example.com/reservation/edit
My question revolves around creating a new reservation. The button to
create a reservation is on the Event page, so there is no need for a
“new” action or view for Reservation. I can POST to the Reservation
path to create a reservation and that works just fine. The thing is, I
really want to use GET to create a new Reservation so if someone hits
the back button in their browser, they won’t get that message that the
browser needs to resend data. Here’s my question. What’s the best way
to go about this while embracing RESTful design? I’m leaning towards
creating a new action ( :member => { :obtain => :get }). I’m also
pondering bastardizing the existing new method, since I don’t need it
for anything else. Any recommendations?
Regards-
Eric