Carrierwave multiple file uploads

I read this example for the form:

<%= p.file_field :avatar, :multiple => true, name: "post_attachments[avatar][]" %>
Why is the name argument necessary Why can't the controller just get the array from <%= p.file_field :avatar %> ?

It adds the “” so the parameter is an array (if you don’t add that, params[:avatar] will be only one file and not an array). I’m not sure why but the helper does not infer that, you have to be explicit on that.

My understanding is that the helpers do the "80%" solution for you -- pave the cowpaths -- but expect you to do the edge cases yourself, since you know what you are doing and what you want. Too much "magic" breeds a complacent user that expects everything to just work, all the time, which is unreasonable for the simple fact that software cannot read minds.

Walter