Created
March 25, 2014 00:56
-
-
Save mikeadeleke/9753180 to your computer and use it in GitHub Desktop.
Carrierwave multiple file uploads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= nested_form_for @property, :html=> {:multipart => true } do |f| %> | |
...... | |
<div class="field"> | |
<%= f.fields_for :images do |image_form| %> | |
<%= image_form.file_field :photo %> | |
<a><%= image_form.link_to_remove "Remove this attatchment" %></a> | |
<% end %> | |
<%= f.link_to_add "Add photo", :images %> | |
</div> | |
....... | |
<div class="actions"> | |
<%= f.submit %> | |
</div> | |
<% end %></div></div></div></div></div></div> | |
Live: http://domimvp.herokuapp.com/properties/new | |
Email: user@example.com | |
Password: password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment