multipart: true used when you upload a file to your form.
Check documentationwhen downloading the file.
You can use it either form_tagexplicitly multipart: trueor simply form_for.
<%= form_tag({action: :upload}, multipart: true) do %>
<%= file_field_tag 'picture' %>
<% end %>
<%= form_for @person do |f| %>
<%= f.file_field :picture %>
<% end %>
In your case, you do not need it multipart: true, since you only have the colorand attributes name.
source
share