Topic: form_for html atttrbutes

my question is about the following piece of code:

<%= form_for @toy, :html => {:multipart => true} do |f| %>
<% end %>

form_for helper accepts :html key to pass html attributes. the list of attributes can be found here. the problem i'm having is that i can't figure out what key value pairs i should pass to the :html hash
This link contains documentation for the form_for helper. nowhere in there i managed to find in what format the :html hash should be.  initially i thought that in order to pass attributes to the form i would need to write something like:

<%= form_for @toy, :html => {:enctype => 'multipart/form-data'} do |f| %>
<% end %>


<%= form_for @toy, :html => {:enctype => 'application/x-www-form-urlencoded'} do |f| %>
<% end %>

but the code i saw has :multipart => true. i never saw this parameter in any of the documentations i found. so i'm asking if anybody knows where i can find complete documentation for ruby on rails? one where i can find a complete list of parameters (and their format, i.e if there is a hash then what key value pairs there can be) each method accepts, or for now at least a complete list of parameters the form_for helper accepts.

any help is appreciated

Re: form_for html atttrbutes

You have a good point,  I quickly looked , and I couldn't find where :multipart => true is explained!!!  I don't remember where I discovered it , but it was when reading posts about multi-part emails.

I think multi-part attachments changed in 3.0,  maybe your looking at 3.0 docs for some 2.X code?

If you can grab 2.3.8 docs, I think it's explained in ActionMailer::Base

Last edited by BradHodges (2010-12-27 19:33:06)

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.