projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
903e49f
)
3114: Follow return_to param, if given, when redirecting users#show to projects#show.
author
Tom Clegg <tom@curoverse.com>
Mon, 18 Aug 2014 22:19:29 +0000
(18:19 -0400)
committer
Tom Clegg <tom@curoverse.com>
Mon, 18 Aug 2014 22:26:45 +0000
(18:26 -0400)
Don't redirect non-html requests.
apps/workbench/app/controllers/users_controller.rb
patch
|
blob
|
history
diff --git
a/apps/workbench/app/controllers/users_controller.rb
b/apps/workbench/app/controllers/users_controller.rb
index 189f295f8fe097c2a2a17e8a5f41342ed254eef0..27f13b7205b4d633c004f483d7ca3da659ebd53f 100644
(file)
--- a/
apps/workbench/app/controllers/users_controller.rb
+++ b/
apps/workbench/app/controllers/users_controller.rb
@@
-7,7
+7,11
@@
class UsersController < ApplicationController
def show
if params[:uuid] == current_user.uuid
- redirect_to project_path(params[:uuid])
+ respond_to do |f|
+ f.html do
+ redirect_to(params[:return_to] || project_path(params[:uuid]))
+ end
+ end
else
super
end