I want to implement this simple form but its in old rails. Can somebody help me out to convert it in Rails 3.2?
<%= start_form_tag ({:action => 'uploadfile'},:multipart => true) %>
<p><label for="upload_file">Select File</label> :
<%= file_field 'upload', 'datafile' %></p>
<%= submit_tag "Upload" %>
<%= end_form_tag %>
<%= form_for(:upload, :url => { :action => "uploadfile" }, :multipart => true) do |form| %>
<p><%= form.label :datafile, "Select File" %> :
<%= form.file_field 'datafile' %></p>
<%= form.submit "Upload" %>
<% end %>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.