On 21 February 2011 03:34, James allan To <li...@ruby-forum.com> wrote: > Question: Is there aright way of doing this (carry params values between > views) or should I just place the data from new in session as we move to > forward to the third page create a hash from session and save in model?
My view would be that the order gets saved to the DB, and you use State Machine functionality to track which step a user is at. Validation *always* *only* goes in the model. Whether you have lots of ":if => Proc.new{|order| order.state = :processing_attendees}" or have a separate OrderAttendeeRegister model which has_many attendees and all the associated validation. But if you store stuff in session, or hidden fields, you are blurring your separation (and it always ended in pain when I've seen it done those ways. HTH -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.