[ARVADOS] created: 2.1.0-1778-gb6cbf9d7d
Git user
git at public.arvados.org
Wed Jan 5 19:35:35 UTC 2022
at b6cbf9d7dc789ce57cc324ad02569187c8db8c54 (commit)
commit b6cbf9d7dc789ce57cc324ad02569187c8db8c54
Author: Ward Vandewege <ward at curii.com>
Date: Wed Jan 5 14:34:45 2022 -0500
18577: workbench1: remove references to `redirect_to :back`, this
stopped working in Rails 5.1.
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>
diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb
index b0b7a0b64..3667d8aca 100644
--- a/apps/workbench/app/controllers/actions_controller.rb
+++ b/apps/workbench/app/controllers/actions_controller.rb
@@ -49,7 +49,7 @@ class ActionsController < ApplicationController
return self.send(param)
end
end
- redirect_to :back
+ redirect_back(fallback_location: root_path)
end
expose_action :copy_selections_into_project do
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 04055f848..5312e733f 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -417,7 +417,11 @@ class ApplicationController < ActionController::Base
respond_to do |f|
f.json { render json: @object }
f.html {
- redirect_to(params[:return_to] || :back)
+ if params[:return_to]
+ redirect_to(params[:return_to])
+ else
+ redirect_back(fallback_location: root_path)
+ end
}
f.js { render }
end
@@ -519,7 +523,7 @@ class ApplicationController < ActionController::Base
redirect_to arvados_api_client.arvados_login_url(return_to: strip_token_from_path(request.url))
else
flash[:error] = "Either you are not logged in, or your session has timed out. I can't automatically log you in and re-attempt this request."
- redirect_to :back
+ redirect_back(fallback_location: root_path)
end
false # For convenience to return from callbacks
end
diff --git a/apps/workbench/app/controllers/user_agreements_controller.rb b/apps/workbench/app/controllers/user_agreements_controller.rb
index bdfaa2403..5e530a657 100644
--- a/apps/workbench/app/controllers/user_agreements_controller.rb
+++ b/apps/workbench/app/controllers/user_agreements_controller.rb
@@ -9,7 +9,11 @@ class UserAgreementsController < ApplicationController
def index
if unsigned_user_agreements.empty?
- redirect_to(params[:return_to] || :back)
+ if params[:return_to]
+ redirect_to(params[:return_to])
+ else
+ redirect_back(fallback_location: root_path)
+ end
end
end
@@ -24,6 +28,10 @@ class UserAgreementsController < ApplicationController
end
end
current_user.activate
- redirect_to(params[:return_to] || :back)
+ if params[:return_to]
+ redirect_to(params[:return_to])
+ else
+ redirect_back(fallback_location: root_path)
+ end
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list