From b1bc068cb9ce44b1ab1e128337191dd11e81a070 Mon Sep 17 00:00:00 2001 From: Dennis Ostendorf <15640196+dnsos@users.noreply.github.com> Date: Mon, 25 Sep 2023 21:13:52 +0200 Subject: [PATCH] Remove unnecessary admin menu condition Previously the condition was needed because _without it_ the Admin::Poll::Questions::Answers::ImagesController would have resulted in settings? evaluating to true. This was undesired because that controller was scoped under Polls, so only polls? should have evaluated to true. Now that we have moved the images link to the customization menu, this check is not necessary anymore. --- app/components/admin/menu_component.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/components/admin/menu_component.rb b/app/components/admin/menu_component.rb index 4712e7794..610c88dd9 100644 --- a/app/components/admin/menu_component.rb +++ b/app/components/admin/menu_component.rb @@ -55,8 +55,7 @@ class Admin::MenuComponent < ApplicationComponent def settings? controllers_names = ["settings", "tenants", "tags", "geozones", "local_census_records", "imports"] - controllers_names.include?(controller_name) && - controller.class.module_parent != Admin::Poll::Questions::Answers + controllers_names.include?(controller_name) end def customization?