Sto tentando di aggiungere un campo Caricamento Avatar alla mia Pagina profilo, ma non appena aggiungo il :html => {:multipart => true}
ad esso, viene emesso un errore di sintassi.Form_for con: multipart => true sputa fuori
<%= form_for(@user), :html => { :multipart => true } do |f| %>
<%= render 'shared/error_messages', object: f.object %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :email %>
<%= f.email_field :email %>
<%= f.label :password %>
<%= f.password_field :password %>
<%= f.label :password_confirmation, "Confirmation" %>
<%= f.password_field :password_confirmation %>
<%= f.label :avatar %>
<%= f.file_field :avatar %>
<%= f.submit "Save changes", class: "btn btn-large btn-primary" %>
<% end %>
L'errore è:
syntax error, unexpected tASSOC, expecting keyword_end
...end= form_for(@user), :html => { :multipart => true } do |f...
... ^