[ARVADOS] updated: 0b4f867ef14af38c07b910643fbe8cc6a93e6bb6
git at public.curoverse.com
git at public.curoverse.com
Thu Jun 5 15:50:34 EDT 2014
Summary of changes:
apps/workbench/app/controllers/application_controller.rb | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
via 0b4f867ef14af38c07b910643fbe8cc6a93e6bb6 (commit)
from f0bf04abdbb7e4b47be85585fba5789d695bb31e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 0b4f867ef14af38c07b910643fbe8cc6a93e6bb6
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Jun 5 15:50:26 2014 -0400
Fixes PipelineInstancesControllerTest. application_controller#create now does
the right thing based on requested response format. refs #2882
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index ae802f8..b109e5c 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -146,8 +146,17 @@ class ApplicationController < ActionController::Base
@new_resource_attrs ||= {}
@new_resource_attrs.reject! { |k,v| k.to_s == 'uuid' }
@object ||= model_class.new @new_resource_attrs, params["options"]
- @object.save!
- redirect_to @object
+ if @object.save
+ respond_to do |f|
+ f.json { render json: @object }
+ f.html {
+ redirect_to @object
+ }
+ f.js { render }
+ end
+ else
+ self.render_error status: 422
+ end
end
def destroy
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list