Here is my view.
<h1>New video</h1>
<%= start_form_tag({:action => ''upload''}, {:multipart
=> true}) %>
<%= file_field_tag "video" %>
<%= text_field "video", "description" %>
<%= submit_tag ''Create'' %>
<%= end_form_tag %>
<%= link_to ''Back'', :action => ''list''
%>
And here is the controller.
def upload
@video = Video.new(params[:video])
file = File.new("testfile.test", "wr")
file = file.read
file.close
end
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---