Carrierwave Rails with edit form and file field (no file selected)
When my editable view loads, all of my fields are populated with the record detail, but the file_field shows "No file Selected" next to the browse button. I would prefer that the name of the recording file be specified instead. Why doesn't it show that the file that was downloaded?
Change view
<%= form_for @document, :html => {:multipart => true} do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :file, "File" %><br />
<%= f.file_field :file %><br />
<%= f.hidden_field :file_cache %><br />
<%= f.label :name, "name" %><br />
<%= f.text_field :name %><br />
<%= f.label :memo, "memo" %><br />
<%= f.text_area :memo %>
</p>
<%= f.hidden_field :folder_id %>
<p><%= f.submit "Upload" %></p>
<% end %>
+3
source to share