#3 new
tzaharia

Deprecated code still remains in file_field_tag docs.

Reported by tzaharia | August 11th, 2008 @ 06:25 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

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Attachments

Pages