On Monday, July 31, 2006, at 5:23 PM, Tom Davies wrote:>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.
>
>Tom
>
>On 7/31/06, Zvonko <zvonko@harije.si> wrote:
>> Hello
>>
>> 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?
>>
>> thx
>> Zvonko
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
>--
>Tom Davies
>
>http://atomgiant.com
>http://gifthat.com
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
While this suggestion is a good one, I have to ask: if you have so many
fields in your model, might it be possible to break it up into smaller
models?
I''ve written a wizard that moves through multiple steps in a process.
Each step happens to correspond to a different model.
_Kevin
www.sciwerks.com
--
Posted with http://DevLists.com. Sign up and save your mailbox.