Iteratively creating multiple file input fields in Rails
- by David
I have a column of product views in a database (e.g. top, bottom, front, back). I'm trying to generate a series of file inputs to allow the user to upload an image for each view. This is the result I'm after:
...
<label>Top</label>
<input type="file" name="image[Top]"><br>
<label>Bottom</label>
<input…