Skip to content

Commit 3a5d6d4

Browse files
authored
Update form_configurable.rb
1 parent 08acb03 commit 3a5d6d4

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

app/models/concerns/form_configurable.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,10 @@ def form_fields(user: nil)
1515

1616
sig { returns(T::Array[T::Hash[Symbol, T.untyped]]) }
1717
def load_form_config_from_yaml
18-
# Remove namespace and use just the class name
1918
file_name = name.demodulize.underscore
2019
config_path = Rails.root.join("config/forms/#{file_name}.yml")
2120
yaml_content = YAML.load_file(config_path)
22-
yaml_content["form_fields"].map do |fieldset|
23-
fieldset = fieldset.deep_symbolize_keys
24-
# Fields now have symbols directly in YAML, no conversion needed
25-
fieldset
26-
end
21+
yaml_content.deep_symbolize_keys!
2722
end
2823
end
2924
end

0 commit comments

Comments
 (0)