X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/55aafbb07904ca24390dd47ea960eae7cb2b909a..28b6afc1e8ccf652c7a8fd43e22a8ac788febd85:/apps/workbench/app/controllers/user_agreements_controller.rb diff --git a/apps/workbench/app/controllers/user_agreements_controller.rb b/apps/workbench/app/controllers/user_agreements_controller.rb index 2797c4c682..5e530a657e 100644 --- a/apps/workbench/app/controllers/user_agreements_controller.rb +++ b/apps/workbench/app/controllers/user_agreements_controller.rb @@ -3,13 +3,17 @@ # SPDX-License-Identifier: AGPL-3.0 class UserAgreementsController < ApplicationController - skip_before_filter :check_user_agreements - skip_before_filter :find_object_by_uuid - skip_before_filter :check_user_profile + skip_before_action :check_user_agreements + skip_before_action :find_object_by_uuid + skip_before_action :check_user_profile 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