From 07f8d14b857c24353a13edc7b4ed7ce2c52aeae3 Mon Sep 17 00:00:00 2001 From: osc-bot <78549874+osc-bot@users.noreply.github.com> Date: Thu, 13 Feb 2025 09:54:32 -0500 Subject: [PATCH] lint a random file (#4144) --- apps/dashboard/app/lib/smart_attributes/attribute.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/app/lib/smart_attributes/attribute.rb b/apps/dashboard/app/lib/smart_attributes/attribute.rb index db57745ae..993aaa5db 100644 --- a/apps/dashboard/app/lib/smart_attributes/attribute.rb +++ b/apps/dashboard/app/lib/smart_attributes/attribute.rb @@ -183,9 +183,10 @@ def select_choices(hide_excludable: true) end.map do |entry| # always cast to array so other layers can try .first & .second for labels and values. # and let nils fall through and get caught in validate! - if entry.is_a?(Array) + case entry + when Array entry - elsif entry.is_a?(String) || entry.is_a?(Symbol) + when String, Symbol [entry.to_s, entry.to_s] end end