Deprecated code still remains in file_field_tag docs.
Reported by tzaharia | August 11th, 2008 @ 06:23 PM
The following example code in the docs for file_field_tag does not work because it lacks parentheses around its parameters and it uses the deprecated end_form_tag:
<%= form_tag { :action => "post" }, { :multipart => true } %>
<label for="file">File to Upload</label> <%= file_field_tag "file" %>
<%= submit_tag %>
<%= end_form_tag %>
The attached patch fixes this by evaluating the "form_tag" instead of outputting it, and removes the "end_form_tag":
<% form_tag '/upload', :multipart => true do %>
<label for="file">File to Upload</label> <%= file_field_tag "file" %>
<%= submit_tag %>
<% end %>
Comments and changes to this ticket
-

tzaharia August 11th, 2008 @ 06:27 PM
Er, sorry, this should probably be in Rails API, not the Narrative Book. I'm new to Lighthouse mostly :)
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
