The rails form serializer allows creation of arrays of key/value pairs. For example,
<form>
<div>
<input type="text" name="people[][name]" value="John">
<input type="text" name="people[][age]" value="35">
</div>
<div>
<input type="text" name="people[][name]" value="Danny">
<input type="text" name="people[][age]" value="28">
</div>
</form>
would get serialized to
{people: [{name: "John", age: 35},{name: "Danny", age: 28}]}
As far as I can tell, Syphon just treats it like a single object, and overwrites all previous items in the array, and produces this:
{people: {name: "Danny", age: 28}}
Am I missing something, or is this just not doable with Syphon?
The rails form serializer allows creation of arrays of key/value pairs. For example,
would get serialized to
As far as I can tell, Syphon just treats it like a single object, and overwrites all previous items in the array, and produces this:
Am I missing something, or is this just not doable with Syphon?