Method: Api::V2::ApplicationController#update

Defined in:
app/controllers/api/v2/application_controller.rb

#updateObject



74
75
76
77
78
79
80
81
82
83
84
# File 'app/controllers/api/v2/application_controller.rb', line 74

def update
    authorize! :update, @record

    # Custom Action
    status, result = check_for_custom_action
    return render json: result, status: 200 if status == true

    # Normal Update Action
    @record.update_attributes!(@body)
    render json: @record.to_json(json_attrs), status: 200
end