On 08 Jan 2009, at 15:33, Dave Smith wrote:
>
>    @project_file = Project_File.new(params[:uploaded_data])

The solution is even more obvious:

ProjectFile.new(params[:project][:uploaded_data]

> new project view
> <% form_for(@project, :html => {:multipart => true}) do |f| %>
>      <%= f.file_field :uploaded_data %>
> <% end %>

And to be honest, this is not really good code either.

You are manually assigning related record ids instead of relying on  
Rails' built-in safeguards.

I'd advise u to start looking at railscasts.com, starting for very  
early ones (complex forms might be a good one for you), getting a  
Rails book (The Rails Way, Agile Web Development with Rails) and  
getting to know the framework better.


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