From 634b5c37ba530158181c34a76ce8c14a7898002b Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Wed, 17 Sep 2025 13:26:58 +0300 Subject: [PATCH] fix form fields import --- lib/templates/find_acro_fields.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/templates/find_acro_fields.rb b/lib/templates/find_acro_fields.rb index af0ee395..7940145a 100644 --- a/lib/templates/find_acro_fields.rb +++ b/lib/templates/find_acro_fields.rb @@ -225,7 +225,10 @@ module Templates is_option_number = option.is_a?(Symbol) && option.to_s.match?(/\A\d+\z/) option = option[1] if option.is_a?(Array) && option.size == 2 - option = option.encode('utf-8', invalid: :replace, undef: :replace, replace: '') if option.is_a?(String) + + if option.is_a?(String) || option.is_a?(Symbol) + option = option.to_s.encode('utf-8', invalid: :replace, undef: :replace, replace: '') + end next if type == 'select' && option.to_s.match?(SELECT_PLACEHOLDER_REGEXP)