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.
This commit is contained in:
Dennis Ostendorf
2023-09-25 21:13:52 +02:00
committed by Javi Martín
parent a902f9e11f
commit b1bc068cb9

View File

@@ -55,8 +55,7 @@ class Admin::MenuComponent < ApplicationComponent
def settings? def settings?
controllers_names = ["settings", "tenants", "tags", "geozones", "local_census_records", "imports"] controllers_names = ["settings", "tenants", "tags", "geozones", "local_census_records", "imports"]
controllers_names.include?(controller_name) && controllers_names.include?(controller_name)
controller.class.module_parent != Admin::Poll::Questions::Answers
end end
def customization? def customization?