Skip to content

Commit

Permalink
lint a random file (#4144)
Browse files Browse the repository at this point in the history
  • Loading branch information
osc-bot authored Feb 13, 2025
1 parent cc4dae7 commit 07f8d14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/dashboard/app/lib/smart_attributes/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07f8d14

Please sign in to comment.