Permalink
Browse files

Add multipart: true to form for file upload.

I was slightly overzealous when removing this before.

Identified here: https://github.com/rails/rails/commit/ed78770b1a13788a5d3fcae484f34654de580bd5\#commitcomment-2281181
  • Loading branch information...
1 parent 5c2eb88 commit d4d9e1f9bf2388a34dc6b7b9473ee14cda3166df @steveklabnik steveklabnik committed Dec 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 guides/source/action_view_overview.md
@@ -1264,7 +1264,7 @@ Creates a field set for grouping HTML form elements.
Creates a file upload field.
```html+erb
-<%= form_tag {action: "post"} do %>
+<%= form_tag {action: "post"}, {multipart: true} do %>
<label for="file">File to Upload</label> <%= file_field_tag "file" %>
<%= submit_tag %>
<% end %>

0 comments on commit d4d9e1f

Please sign in to comment.