Form_tag versus form_for with :multipart => true

Consider the following two ways of doing forms, both with :multipart
=> true. Only
the form_for will work properly when using attachment_fu

<%= form_tag :action => 'create', :multipart => true %> <%= file_field 'assignment', :uploaded_data %> <%= submit_tag "Create" %> <%= end_form_tag %>

HTML:

<% form_for :assignment, :url => {:action => 'create'}, :html => {:multipart => true}) do |f| %> <%= file_field :assignment, :uploaded_data %> <%= submit_tag "Upload Assignment" %> <% end %>

HTML:

Only the second form works with attachment_fu. Why are these two
translations incompatible?
I would expect the enctype to be specified on the first form above.

Thanks for any feedback,

Gordon

On 8/29/07, [email protected] [email protected] wrote:

<%= submit_tag "Upload Assignment" %>

the :multipart specification goes into the options hash for the
form_tag, such as the following:

<% form_tag({:action => ‘settings’}, {:multipart => true, :class =>
“form-style2”} ) do -%>

<% end %>