I have a situation where I want to show the user details about an
appointment they entered. They enter their name, phone number(s) and
other private data in a form. I save that data in the controller with
a POST from a “confirmation” page.
I could simply show the params when that page is rendered (the save
one), but if they use the browser refresh it’ll save the data again.
I thought about doing a redirect to a view that loads the newly
created object, but this shows their appointment ID in the URL.
Someone could simply subtract a couple ID’s to view other peoples
I was hoping there would be a nice Rails solution. I could create a
view that just does a POST at onLoad which posts to a page that loads
the appointment and shows the data, that way the ID wont show, but was
hoping there would be an easier way using Rails.
I did notice there was a post method in
ActionController::Integration::Session, but I couldn’t get that to
work (something about an uninitialized constant).