Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Deprecated code still remains in file_field_tag docs.

#3

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 %>


Reported by tzaharia · August 11th, 2008 @ 06:25 PM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. tzaharia
    tzaharia

    Er, sorry, this should probably be in Rails API, not the Narrative Book. I'm new to Lighthouse mostly :)

    August 11th, 2008 @ 06:27 PM

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.