Hi group, I''m hopefully right in here, coming frm perl trying to realize my first rails project with support from dhh''s book in my hands. I have the following (simple?) task : A user shall be able to submit different data in different forms and at the end of the process this data shall be stored in different tables. First page asks for adress data, second one for order details, third for shipping details and the last for payment info. (4 tables so far). So I (should?) store all the info in a session object just like a virtual shopping cart? So far i need 4 models: Adress, Orderdetail, Shippingdetail, Paymentinfo. If I create 4 inputforms now, I can push the data into my tables just in time, this is, what I dont want. Instead I need to hold the given data in my session object and store it finally. So I should create another model for my sessionobject and name it Cart? After reading an realizing the example from dhh''s book I am a liitle confused. Maybe someone can point me in the right direction. Thx in advance Jason --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Indeed, either by using sessions or one of the following two options: 1. Pass everything in hidden input fields for the duration of the process. 2. Allow partial validations such as per the API examples: validates_presence_of :address, :if => Proc.new { |order| order.step > 3 } - Roderick -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Roderick, thx for your answer. I think passing already given data in hidden fields is not an option (so I did using Perl), cause theres too much stuff to get into my bag. Partial validations ... I read about and used simple validations, I did not know, that its possible to use them in that way? But will read about it ... hopefully find something. Gtx Jason --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Jason, I recommend using session object, it''s easier and you also will not need to update your hidden fields if you add some new data inputs. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---