Method: Effective::OrdersController#update
- Defined in:
- app/controllers/effective/orders_controller.rb
#update ⇒ Object
Confirms the order from existing order
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'app/controllers/effective/orders_controller.rb', line 71 def update @order ||= Effective::Order.find(params[:id]) EffectiveOrders.(self, :update, @order) @order.assign_attributes(checkout_params) if (@order.confirm! rescue false) redirect_to(effective_orders.order_path(@order)) else flash.now[:danger] = "Unable to proceed: #{flash_errors(@order)}. Please try again." render :edit end end |