Note that there are some explanatory texts on larger screens.

plurals
  1. POrails 3.2.x, simple_form_for, paperclip, multiple uploads
    primarykey
    data
    text
    <p>Ok just to get this out of the way I dont need anything fancy just to be able to list 5 file fields for uploading images. Currently, I receive no errors when visiting the form but the form file upload inputs aren't being display where the rest of the form is rendering properly.</p> <p>Things I have working so far:</p> <ul> <li>s3 with paperclip</li> <li>Upload single files</li> </ul> <p>With that said Ill post portions of the models to give a better picture of my setup:</p> <p>My product model:</p> <pre><code>has_many :photos attr_accessible :name, :description, :price, :category_id, :location_ids accepts_nested_attributes_for :photos, :allow_destroy =&gt; true </code></pre> <p>My photo model:</p> <pre><code>belongs_to :products attr_accessible :image, has_attached_file :image, styles: { thumb: '100x100&gt;', square: '200x200#', medium: '300x300&gt;' } </code></pre> <p>My product controller:</p> <pre><code>def new @product = Product.new 5.times { @product.photos.build } end </code></pre> <p>My product post form:</p> <pre><code>&lt;%= simple_form_for @product, :url =&gt; admin_products_path do |form| %&gt; &lt;% form.simple_fields_for :photos do |builder| %&gt; &lt;% if builder.object.new_record? %&gt; &lt;p&gt; &lt;%= builder.input :image %&gt; &lt;/p&gt; &lt;% end %&gt; &lt;% end %&gt; .... &lt;% end %&gt; </code></pre> <p>I tried to keep this as simple as possible since this is my first implementation. Most of the documentation online was for a little bit older rails but I attempted to make it work with rails 3.2.1, paperclip, simple_forms_for, aws-sdk.</p> <p>Please help :D</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload