title: Rails: Form with configurable number of inputs
body: <p>I wrote a form that generates a text input for each property.<br>
  The list of properties is configurable by the customer.</p>
  
  <pre><code>&lt;% properties = ["refractivity_at_2kHz", "refractivity_at_5kHz"] %&gt;
  
  &lt;% properties.each do |property| %&gt;
    &lt;div class="property"&gt;
      &lt;%= f.label property %&gt;
      &lt;%= f.text_field property %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>It fails with the error <code>undefined method refractivity_at_2kHz</code>.</p>
  
  <p>What is the usual solution for this problem?</p>
  
  <p>Should I add an array to my model, and use <code>f.text_field myarray[property]</code> ?</p>