http://api.rubyonrails.org/classes/ActionController/Base.html#M000459
I do recommend you buy a book on Rails. It is worth the investment. On Oct 20, 12:51 pm, Jay Pangmi <[EMAIL PROTECTED]> wrote: > Hi, I've created a form and when I click "Place Order" button, I'm taken > to the checkout details page with all the details about the customer and > the bookings and then there is a "Confirm" button, on clicking which all > the details will be saved in the database tables. But a silly problem > (ended up being huge for me), heres what I've done: > > VIEW: > <%form_for :customer, :url => {:action => :checkout_details} do |form|%> > ............. > <%=submit_tag "Place Order"%> > <%end> > > CONTROLLER: > def checkout_details > [EMAIL PROTECTED] = Customer.new(params[:customer]) > end > > Until now I could get the object of the Customer and hence all the > inputs from the user but this checkout_details.rhtml doesn't save > anything it just displays all the customer details and booking details > and a "Confirm" button on clicking which "save_details" action will be > called which saves all the details. So, how can I pass this @customer > object to this save_details action? Sorry, if it is silly, but big > enough for me to get stuck. > Thanks.. > -- > Posted viahttp://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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---