On 07 Jan 2009, at 16:39, Dave Smith wrote:

> the page loads and i can select a file but when i go to save im  
> getting
> the error,
>
> ActiveRecord::UnknownAttributeError in ProjectsController#create
> unknown attribute: uploaded_data

There are two parts of the upload form that differ from typical usage.
   1. Include ':multipart => true' in the html options of the form_for  
tag.
     Example:
       <% form_for(:attachment_metadata, :url => { :action =>  
"create" }, :html => { :multipart => true }) do |form| %>

   2. Use the file_field helper with :uploaded_data as the field name.
     Example:
       <%= form.file_field :uploaded_data %>

I suspect you didn't include the multipart option.


Best regards

Peter De Berdt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to