Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update
- begin
- if @brand.update brands_params
- render json: { message: "successfully updated"}
- else
- response_error(title: 'No se pudo actualizar', reasons: {base: @brand.errors}, description: "Los atributos son invalidos", status_code: 422)
- end
- rescue Exception => e
- response_error(title: 'No se pudo actualizar', reasons: {base: @brand.errors}, description: "Los atributos son invalidos", status_code: 422)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement