[ARVADOS] updated: a75d871fff6f85f2a102d0f17b6219cfe799abe0
git at public.curoverse.com
git at public.curoverse.com
Thu Dec 26 12:16:09 EST 2013
Summary of changes:
.../app/controllers/application_controller.rb | 10 ++++++++--
.../app/controllers/authorized_keys_controller.rb | 3 ++-
2 files changed, 10 insertions(+), 3 deletions(-)
via a75d871fff6f85f2a102d0f17b6219cfe799abe0 (commit)
via ed2057e310ecd6bab7ade0a73752e388a273031d (commit)
from 15f2a2c449095c4be2d41d2cd6915ca07ae07644 (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 a75d871fff6f85f2a102d0f17b6219cfe799abe0
Author: Tom Clegg <tom at clinicalfuture.com>
Date: Thu Dec 26 09:15:41 2013 -0800
Do not ignore attributes received with create request.
diff --git a/apps/workbench/app/controllers/authorized_keys_controller.rb b/apps/workbench/app/controllers/authorized_keys_controller.rb
index a2beb49..4487ead 100644
--- a/apps/workbench/app/controllers/authorized_keys_controller.rb
+++ b/apps/workbench/app/controllers/authorized_keys_controller.rb
@@ -6,7 +6,8 @@ class AuthorizedKeysController < ApplicationController
end
def create
- @object = AuthorizedKey.new authorized_user_uuid: current_user.uuid, key_type: 'SSH'
+ defaults = { authorized_user_uuid: current_user.uuid, key_type: 'SSH' }
+ @object = AuthorizedKey.new defaults.merge(params[:authorized_key])
super
end
end
commit ed2057e310ecd6bab7ade0a73752e388a273031d
Author: Tom Clegg <tom at clinicalfuture.com>
Date: Thu Dec 26 09:14:43 2013 -0800
Redirect to a suitable page when HTML response requested for create/update.
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 126dbbe..57ba0cf 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -62,7 +62,13 @@ class ApplicationController < ActionController::Base
end
respond_to do |f|
f.json { render json: @object }
- f.html { render }
+ f.html {
+ if request.method == 'GET'
+ render
+ else
+ redirect_to params[:return_to] || @object
+ end
+ }
end
end
@@ -93,7 +99,7 @@ class ApplicationController < ActionController::Base
def create
@object ||= model_class.new params[model_class.to_s.singularize.to_sym]
@object.save!
- redirect_to @object
+ redirect_to(params[:return_to] || @object)
end
def destroy
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list