RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: pbevin
Site: http://www.petebevin.com
I found that in Rails 4, setting name: in f.file_field didn't work: Rails appended [] to the end of the field name regardless. I had to replace this:
name:
f.file_field
[]
<%= f.file_field :image, multiple: true, name: "painting[image]" %>
with plain HTML, like this:
<input id="painting_image" multiple="multiple" name="painting[image]" type="file" />
I found that in Rails 4, setting
name:
inf.file_field
didn't work: Rails appended[]
to the end of the field name regardless. I had to replace this:with plain HTML, like this: