Is it possible to create something like wizard with database
transactions, so transaction would begin on page one, then on page two,
three… etc. there would be some data altered in the database and then
on the last page the transaction would be committed or rolled back?
I think it might be easier to just store your data in the session
until you reach the final step, then you could commit it all just at
the end.
So, you could have:
Step 1: Enter name
session[:name] = ‘some name’
Step 2: Enter credit card
session[:credit_card] = blah
And at the end, you could just grab those values and add them to your
Active Record objects and save. You should probably remove them from
the session too.