projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix response type for #index
[arvados.git]
/
services
/
api
/
app
/
controllers
/
application_controller.rb
diff --git
a/services/api/app/controllers/application_controller.rb
b/services/api/app/controllers/application_controller.rb
index d6efb015cf9074d4771b4f016fe52f4bd7635271..c80b578adaa69efe1584caeece5fb225b4608d65 100644
(file)
--- a/
services/api/app/controllers/application_controller.rb
+++ b/
services/api/app/controllers/application_controller.rb
@@
-37,8
+37,11
@@
class ApplicationController < ActionController::Base
end
def update
- @object.update_attributes resource_attrs
- show
+ if @object.update_attributes resource_attrs
+ show
+ else
+ render json: { errors: @object.errors.full_messages }, status: 422
+ end
end
def destroy