From f17ea1ab5511f24c85cf1088569bd79172eab810 Mon Sep 17 00:00:00 2001 From: aaronskiba <71047780+aaronskiba@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:35:58 -0700 Subject: [PATCH] refactor / make rubocop happy --- app/controllers/plans_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 277ce4a699..e3da35eae0 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -193,7 +193,9 @@ def show @default_orgs = Org.default_orgs @all_ggs_grouped_by_org.each do |org, ggs| # @default_orgs and already selected guidance groups are important. - @important_ggs << [org, ggs] if (@default_orgs.include?(org) || !(ggs & @selected_guidance_groups).empty?) && !@important_ggs.include?([org, ggs]) + if (@default_orgs.include?(org) || (ggs & @selected_guidance_groups).any?) && !@important_ggs.include?([org, ggs]) + @important_ggs << [org, ggs] + end end # Sort the rest by org name for the accordion