app/controllers/admin/orders_controller.rb
# The show page posts to this action
# See Effective::OrdersController checkout
The show page posts to this action
See Effective::OrdersController checkout
The show page posts to this action See Effective :: OrdersController checkout
def checkout
      @order = Effective::Order.find(params[:id])
      @order.skip_minimum_charge_validation = true if @order.refund?
      @page_title ||= 'Checkout'
      authorize_effective_order!
      Effective::Order.transaction do
        begin
          @order.assign_attributes(checkout_params)
          @order.save!
          redirect_to(effective_orders.admin_order_path(@order)) and return
        rescue => e
          raise ActiveRecord::Rollback
        end
      end
      flash.now[:danger] = "Unable to save order: #{@order.errors.full_messages.to_sentence}. Please try again."
      render :show
    end
def checkout @order = Effective :: Order . find ( params [ :id ] ) @order . skip_minimum_charge_validation = true if @order . refund? @page_title ||= 'Checkout' authorize_effective_order! Effective :: Order . transaction do begin @order . assign_attributes ( checkout_params ) @order . save! redirect_to ( effective_orders . admin_order_path ( @order ) ) and return rescue => e raise ActiveRecord :: Rollback end end flash . now [ :danger ] = "Unable to save order: #{@order.errors.full_messages.to_sentence}. Please try again." render :show end
The show page posts to this action
See Effective::OrdersController checkout
The show page posts to this action See Effective :: OrdersController checkout