Module: Tramway::Core::ApplicationForms::PropertiesObjectHelper
- Included in:
- Tramway::Core::ApplicationForm
- Defined in:
- app/forms/tramway/core/application_forms/properties_object_helper.rb
Instance Method Summary collapse
Instance Method Details
#form_properties(**args) ⇒ Object
4 5 6 |
# File 'app/forms/tramway/core/application_forms/properties_object_helper.rb', line 4 def form_properties(**args) @form_properties = args end |
#properties ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/forms/tramway/core/application_forms/properties_object_helper.rb', line 8 def properties @form_properties ||= {} yaml_config_file_path = Rails.root.join('app', 'forms', "#{self.class.name.underscore}.yml") return @form_properties unless File.exist? yaml_config_file_path @form_properties.deep_merge YAML.load_file(yaml_config_file_path).deep_symbolize_keys end |