Sunday, February 20, 2011

[Rails] Newb: Order page, multiple view single model question

Hi I would just like to ask if someone can point me to the right
direction. I have an order page which will need to be split into 3 views
before saving say in controller:

def new
@order = Order.new
end

def process_new
@order = Order.new(params[:order])
#do validation for new
# redirect to no_of_attendees
end

def no_of_attendees
@order = Order.new(params[:order])
end

def process_no_of_attendees
@order = Order.new(params[:order])
#do validation
#redirect to save page
end

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?

Thanks,

James

P>S. Rails 2.3.10

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate