Method: CheckoutTypesController#update

Defined in:
app/controllers/checkout_types_controller.rb

#updateObject

PUT /checkout_types/1 PUT /checkout_types/1.json



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'app/controllers/checkout_types_controller.rb', line 74

def update
  if params[:move]
    move_position(@checkout_type, params[:move])
    return
  end

  respond_to do |format|
    if @checkout_type.update_attributes(checkout_type_params)
      format.html { redirect_to @checkout_type, notice: t('controller.successfully_updated', model: t('activerecord.models.checkout_type')) }
      format.json { head :no_content }
    else
      format.html { render action: "edit" }
      format.json { render json: @checkout_type.errors, status: :unprocessable_entity }
    end
  end
end