Method: LesliSecurity::DescriptorsController#update

Defined in:
app/controllers/lesli_security/descriptors_controller.rb

#updateObject

PATCH/PUT /descriptors/:id



89
90
91
92
93
94
95
96
97
98
99
100
# File 'app/controllers/lesli_security/descriptors_controller.rb', line 89

def update
    return respond_with_not_found unless @descriptor.found?

    @descriptor.update(descriptor_params)

    # Check if the update went ok
    unless @descriptor.successful?
        return respond_with_error(@descriptor.errors)
    end

    respond_with_successful(@descriptor.result)
end