There was an error while loading. Please reload this page.
1 parent 08acb03 commit 3a5d6d4Copy full SHA for 3a5d6d4
1 file changed
app/models/concerns/form_configurable.rb
@@ -15,15 +15,10 @@ def form_fields(user: nil)
15
16
sig { returns(T::Array[T::Hash[Symbol, T.untyped]]) }
17
def load_form_config_from_yaml
18
- # Remove namespace and use just the class name
19
file_name = name.demodulize.underscore
20
config_path = Rails.root.join("config/forms/#{file_name}.yml")
21
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
+ yaml_content.deep_symbolize_keys!
27
end
28
29
0 commit comments