Generating a form from a config file

List,

I received a little help on #rubyonrails on freenode but am unfortunately still stuck. I am in a situation where I need to dynamically create a form from a config file. What I did was created a config/form.yml which contains the following as an example:

field_name_here: &field_name_here
type: input_field
default: default_value_goes_here
label: some label would go here

I then have a helper method called get_dynamic_form. This method would be called from the view to load the config and generate a form. I have it parsing the config, but i am unsure how to get it to send() the appropriate methods to the view. Would I have to buffer the output and return it at once, otherwise Obj.send() will send the data straight out, which will not work. I want to avoid generating html at all costs, as i want this to be as clean and consistent as possible.

If you have any recommendations, please let me know. Thanks :slight_smile: