Reminder - rails forms with file uploads

Tags: 

Just a quick reminder for myself: if you're doing a form that is uploading files, remember to add :multipart => true to the form tag, e.g.:
[source:ruby]
< % form_for(:product, :url => products_path(@product), :html => {:multipart => true, :method => :put }) do |f| %>

< %= f.file_field :photo %>

< % end %>
[/source]

How to reply

Care to add your own 2 cents? Let me know via Twitter or my contact page.