title: rails list all items for a many to many including design
body: <p>So I have the following models:
  Image:</p>
  
  <pre><code>class Image &lt; ActiveRecord::Base
    has_many :product_images
    has_many :products, :through =&gt; :product_images
    attr_accessible :asset, :name, :description, :product_ids, :file_content_type, :is_boolean
    accepts_nested_attributes_for :product_images
    has_attached_file :asset
  end
  </code></pre>
  
  <p>ProductImage:</p>
  
  <pre><code>class ProductImage &lt; ActiveRecord::Base
    belongs_to :product
    belongs_to :image
    attr_accessible :is_thumbnail
  end
  </code></pre>
  
  <p>and Product:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
  has_many :images, :through =&gt; :product_images
  has_many :product_images
  attr_accessible :name, :description, :thumbnail, :searchTerms, :group_ids, :upload_file_ids
  </code></pre>
  
  <p>end</p>
  
  <p>Now what I would like to do on the images form is display a checkbox for all the products and then another checkbox for the is_thumbnail attribute
  I have had a look into using simple_fields_for but this will only display if the product has already been added. Is there a way to do this?</p>
  
  <pre><code>&lt;%= f.simple_fields_for(:product_images) do |builder| %&gt;
    &lt;%= builder.input :is_thumbnail %&gt;
    &lt;%= builder.association :products, include_blank: false %&gt;
  &lt;% end %&gt;
  </code></pre>