From 3a7c9962c890ce5431256f0b07aa6a4e9fdeab63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ce=C4=BEuch?= Date: Fri, 9 Feb 2024 11:24:39 +0100 Subject: [PATCH] disable active topic in vote app --- app/controllers/application_controller.rb | 4 ++++ .../apps/president_vote_app/application_forms_controller.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e13dcc1f..19b0b724 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -42,6 +42,10 @@ def disable_feedback @disable_feedback = true end + def disable_current_topic + @active_current_topic = nil + end + private def set_default_metadata diff --git a/app/controllers/apps/president_vote_app/application_forms_controller.rb b/app/controllers/apps/president_vote_app/application_forms_controller.rb index 7a309b32..aa155798 100644 --- a/app/controllers/apps/president_vote_app/application_forms_controller.rb +++ b/app/controllers/apps/president_vote_app/application_forms_controller.rb @@ -1,6 +1,6 @@ class Apps::PresidentVoteApp::ApplicationFormsController < ApplicationController helper FormatDaysHelper - before_action :set_metadata, :check_inactive_president_application + before_action :set_metadata, :check_inactive_president_application, :disable_current_topic before_action :disable_feedback, only: [:show, :delivery, :create] def show