projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e847d0
)
Respond with an error status if save fails during create method.
author
Tom Clegg <tom@curoverse.com>
Fri, 17 Jan 2014 20:17:54 +0000
(12:17 -0800)
committer
Tom Clegg <tom@curoverse.com>
Fri, 17 Jan 2014 20:17:54 +0000
(12:17 -0800)
refs #1880
services/api/app/controllers/application_controller.rb
patch
|
blob
|
history
diff --git
a/services/api/app/controllers/application_controller.rb
b/services/api/app/controllers/application_controller.rb
index c2a117bf63ff511a4d7551aa3988226c22b10928..5d698e707c0baadcc4e31fe988e6e0f213fb7448 100644
(file)
--- a/
services/api/app/controllers/application_controller.rb
+++ b/
services/api/app/controllers/application_controller.rb
@@
-33,8
+33,11
@@
class ApplicationController < ActionController::Base
def create
@object = model_class.new resource_attrs
- @object.save
- show
+ if @object.save
+ show
+ else
+ render_error "Save failed"
+ end
end
def update