Simple form text input fields as part of an array
<p>So I have 3 text input fields and each one represents a co-ordinate and they are stored in the array format <code>[x, y, z]</code> in my model.</p>

<p>I am trying to use the input fields to work together to produce an array submitted with the form. My code currently:</p>

<pre><code>=f.input_field :coordinates[0], value: "1"
=f.input_field :coordinates[1], value: "2"
=f.input_field :coordinates[2], value: "3"
</code></pre>

<p>So my hoping is that I can use the <code>coordinates</code> param in the controller to save it to the database.
The issue is that with this setup the html produced is <code>&lt;input value="1" name="shape[o]" id="shape_o"&gt;</code> when it should be <code>&lt;input value="1" name="shape[coordinates][]" id="shape_coordinates_0"&gt;</code></p>

<p>N.B. I already have <code>serialize :coordinates</code> in the model</p>