Hello, everyone:
I tried the html option (multipart) to upload an image to
server , but the form_for always errors. If I remove the html option,
it works. I have no idea the reason, looks like it is only a syntax
error, but couldn’t figure it out.
Thanks a lot in advance!
Br,
Myst
=============
<% form_for([@task, @comment]), :html => {:multipart => true} do |f|
%>
Comment body
<%= f.text_area :desc %>
Image
<%= file_column_field 'comment', 'image' %>
<%= f.submit button_name %>
<% end %> ============compile error
/home/fs/xxiao/3rdRail/workspace/ww/app/views/comments/
_comment.html.erb:1: syntax error, unexpected ‘,’, expecting kEND
_erbout = ‘’; form_for([@task, @comment]), :html => {:multipart =>
true} do |f| ; _erbout.concat “\n”
^
/home/fs/xxiao/3rdRail/workspace/ww/app/views/comments/
_comment.html.erb:1: syntax error, unexpected kDO, expecting kEND
_erbout = ‘’; form_for([@task, @comment]), :html => {:multipart =>
true} do |f| ; _erbout.concat “\n”
^
/home/fs/xxiao/3rdRail/workspace/ww/app/views/comments/
_comment.html.erb:13: syntax error, unexpected kEND, expecting $end