I am going through the railstutorial.org book, so I am still a newbie with ruby.
My goal is to create my own multi-site framework with admin pages (including pages for administering uploaded files, users, and dynamical pages). I have been experimenting with Refinery, but it may be too difficult to modify for different purposes (not sure yet).
For now, based on the tutorial, I know how to use form_for to produce forms. The fields are handled like this:
<%= f.label :name %>
<%= f.text_field :name, class: 'form-control' %>
What would be the neatest way to make this code more generic, so I don't have to actually write the field names here and in several other places?
I need to iterate a field list either in db schema, or in a manually-built array of fields.