From d96d252df30dc64664c0c27f2d8ebfdd8aba3fb6 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Mon, 27 Apr 2026 12:13:53 +0300 Subject: [PATCH] use post for test mode --- app/controllers/testing_accounts_controller.rb | 2 +- app/views/shared/_navbar.html.erb | 2 +- app/views/shared/_settings_nav.html.erb | 2 +- app/views/shared/_test_mode_toggle.html.erb | 2 +- config/routes.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/testing_accounts_controller.rb b/app/controllers/testing_accounts_controller.rb index 6c6cf3d1..44274eef 100644 --- a/app/controllers/testing_accounts_controller.rb +++ b/app/controllers/testing_accounts_controller.rb @@ -3,7 +3,7 @@ class TestingAccountsController < ApplicationController skip_authorization_check only: :destroy - def show + def create authorize!(:manage, current_account) authorize!(:manage, current_user) diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 6d66674c..c647dc27 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -59,7 +59,7 @@ <% end %> <% if (can?(:manage, EncryptedConfig) && current_user == true_user) || (current_user != true_user && current_account.testing?) %> - <%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :get, html: { class: 'w-full py-1' } do |f| %> + <%= form_for '', url: testing_account_path, method: current_account.testing? ? :delete : :post, html: { class: 'w-full py-1' } do |f| %>