Displaying 1 result from an estimated 1 matches for "checkout_path".
2010 Apr 14
1
Rails does not display form error message on a custom method
...#39;'Thank you! Your order is being processed.''
format.html { redirect_to( products_path ) }
format.xml { head :ok }
else
flash[:error] = ''Please review your items'' #added to confirm an
error is present
format.html { redirect_to( checkout_path ) }
format.xml { render :xml => @order.errors, :status =>
:unprocessable_entity }
end
end
end
[/code]
And the form in the checkout view:
[code]
<% form_for @order, :url => { :controller => "orders", :action =>
"complete_order" } do |f| %...