From d0e57a8a4463a0e8523e20e9766232d03a8d973b Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sat, 27 Dec 2025 04:46:18 +0900 Subject: [PATCH] Move helper methods for nav to the dedicated place --- app/controllers/application_controller.rb | 20 -------------------- app/helpers/navbar_helper.rb | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fb64bd1b7..960e005ee 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -8,10 +8,6 @@ class ApplicationController < ActionController::Base helper_method :current_event helper_method :current_website - helper_method :display_staff_event_subnav? - helper_method :display_staff_selection_subnav? - helper_method :display_staff_program_subnav? - helper_method :display_website_subnav? helper_method :program_mode? helper_method :schedule_mode? helper_method :program_tracks @@ -150,34 +146,18 @@ def enable_staff_event_subnav @display_staff_subnav = true end - def display_staff_event_subnav? - @display_staff_subnav - end - def enable_staff_selection_subnav @display_selection_subnav = true end - def display_staff_selection_subnav? - @display_selection_subnav - end - def enable_staff_program_subnav @display_program_subnav = true end - def display_staff_program_subnav? - @display_program_subnav - end - def enable_staff_schedule_subnav @display_schedule_subnav = true end - def display_website_subnav? - @display_website_subnav - end - def enable_website_subnav @display_website_subnav = true end diff --git a/app/helpers/navbar_helper.rb b/app/helpers/navbar_helper.rb index 85d0886dd..3320eaac0 100644 --- a/app/helpers/navbar_helper.rb +++ b/app/helpers/navbar_helper.rb @@ -70,4 +70,20 @@ def nav_item_class(key) def subnav_item_class(key) 'active' if @active_subnav_key == key end + + def display_staff_event_subnav? + @display_staff_subnav + end + + def display_staff_selection_subnav? + @display_selection_subnav + end + + def display_staff_program_subnav? + @display_program_subnav + end + + def display_website_subnav? + @display_website_subnav + end end