Scenario: I''ve got a 4 step checkout. During the 2nd step, I collect order info and set to a model variable Order and store that in a session var called session[:order] to process later or repopulate the form if they do not finish checkout. I do NOT, however want to store the credit card number in the session, yet I still need to carry it over from the 2nd step to the final step. Question: What''s the best way to carry the CC# over a few steps without storing it in the session and without creating a hidden form input. Class variables? The flash? Thanks, Chad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hi Chad, I think using the flash would be your best option. Just pass it from Step2 to Step3, then to Step4. that should do it. Cheers, Simon On Oct 26, 8:35 am, "Chad Arimura" <carim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Scenario: > > I''ve got a 4 step checkout. During the 2nd step, I collect order info and > set to a model variable Order and store that in a session var called > session[:order] to process later or repopulate the form if they do not > finish checkout. I do NOT, however want to store the credit card number in > the session, yet I still need to carry it over from the 2nd step to the > final step. > > Question: > > What''s the best way to carry the CC# over a few steps without storing it in > the session and without creating a hidden form input. Class variables? The > flash? > > Thanks, > Chad--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
One problem: Say they get to the review step and hit refresh a few times, or remove a product, or.... Flash goes bye bye. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Give that the flash itself is just stored in the session, what''s the problem with storing in the flash One other possibility (maybe overkill) is backgroundrb, you can use it to cache objects between requests. Depending on what you''re worried about, the fact that (unlike sessions) it will never hit the disk or database may be an advantage. Fred -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---