So I have 3 text input fields and each one represents a co-ordinate and they are stored in the array format [x, y, z] in my model.
I am trying to use the input fields to work together to produce an array submitted with the form. My code currently:
=f.input_field :coordinates[0], value: "1"
=f.input_field :coordinates[1], value: "2"
=f.input_field :coordinates[2], value: "3"
So my hoping is that I can use the coordinates param in the controller to save it to the database.
The issue is that with this setup the html produced is <input value="1" name="shape[o]" id="shape_o"> when it should be <input value="1" name="shape[coordinates][]" id="shape_coordinates_0">
N.B. I already have serialize :coordinates in the model