Whenever I have used paperclip to upload multiple images I have created a separate model called images for example and used the accepts_nested_attributes_for in the associated model..
But what if i want to add multiple images without using this. So for example if my model looks like this
class Portfolio < ActiveRecord::Base
belongs_to :sector
attr_accessible :overview, :title, :sector_id, :photo
has_attached_file :photo, :styles => { :portfolio => "680x680#"}
end
And my form looks like this
<%= form_for @portfolio do |f| %>
<%= f.label :title, "Title", :class => 'title_label' %>
<%= f.text_field :title %>
<%= f.label :sector_id, "Choose Sector", :class => 'title_label' %><br>
<%= f.collection_select(:sector_id, Sector.all, :id, :name, :prompt => "Please Select a Sector") %><br>
<%= f.label :overview, "Overview", :class => 'title_label' %>
<%= f.text_area :overview %><br>
<%= f.file_field :photo %><br><br>
<%= f.submit 'Submit', :class => 'btn' %>
<% end %>
How would i go about uploading multiple images in this scenario.. Normally within nested form for example i would use the link_to_add helper provided.
I don't have this available though with this scenario so what can i do?
is it best practive to always keep the attachments/photos separate and use nested_attributes?
Any help appreciated