> 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
Hi Peter, Many thanks for your answer, I have included this in my code. This is my entire new.html.erb file. <% form_for(@project, :html => {:multipart => true}) do |f| %> <%= f.error_messages %> <p> <%= f.label :name %><br /> <%= f.text_field :name %> </p> <p> <%= f.label :description %><br /> <%= f.text_field :description %> </p> <p> <%= f.label :date_due %><br /> <%= f.calendar_date_select :date_due %> </p> <p> <%= f.file_field :uploaded_data %> </p> <p> <%= f.submit "Create" %> </p> <% end %> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---