From bdb65921f1cb953b5488e88c62f815d3a9c791f9 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 19 Feb 2025 06:28:12 +0300 Subject: [PATCH] Allow to revisit terms page if already agreed --- app/controllers/accounts/terms_controller.rb | 5 ----- test/controllers/accounts/terms_controller_test.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/controllers/accounts/terms_controller.rb b/app/controllers/accounts/terms_controller.rb index 568abcdb9..6fe498566 100644 --- a/app/controllers/accounts/terms_controller.rb +++ b/app/controllers/accounts/terms_controller.rb @@ -18,11 +18,6 @@ module Accounts render :partial => "terms" else @title = t ".title" - - if current_user.terms_agreed? - # Already agreed to terms, so just show settings - redirect_to account_path - end end end diff --git a/test/controllers/accounts/terms_controller_test.rb b/test/controllers/accounts/terms_controller_test.rb index ea8cd4e9f..e45c3c3bd 100644 --- a/test/controllers/accounts/terms_controller_test.rb +++ b/test/controllers/accounts/terms_controller_test.rb @@ -29,7 +29,7 @@ module Accounts session_for(user) get account_terms_path - assert_redirected_to account_path + assert_response :success end def test_show_not_seen_without_referer -- 2.39.5