I wrote a form that generates a text input for each property.
The list of properties is configurable by the customer.
<% properties = ["refractivity_at_2kHz", "refractivity_at_5kHz"] %>
<% properties.each do |property| %>
<div class="property">
<%= f.label property %>
<%= f.text_field property %>
</div>
<% end %>
它错了<代码>未界定的方法重复使用_at_2kHz。
What is the usual solution for this problem?
Should I add an array to my model, and use f.text_field myarray[property]
?