title: Rails user experience vs file structure with carrierwave and nested forms - Need input on design decisions
body: <p>I have 2 models, product and a photos model as follows:</p>
  
  <p>product.rb</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    has_many :photos, dependent: :destroy
    accepts_nested_attributes_for :photos, allow_destroy: true
  end
  </code></pre>
  
  <p>photo.rb</p>
  
  <pre><code>class Photo &lt; ActiveRecord::Base
    belongs_to :product
    validates :album, presence: true
    mount_uploader :image, PhotoUploader
  end
  </code></pre>
  
  <p>I'm using carrierwave &amp; s3 for file uploads. </p>
  
  <p>I can nest the forms so that users can upload photos at the same time that they create the product. In this scenario, the photo models are saved before the product model is saved, which leads to a photo file path of something like:</p>
  
  <pre><code>uploads/photos/images/photo_id
  </code></pre>
  
  <p>But the file structure would make more sense if it was something like:</p>
  
  <pre><code>uploads/product/id/photos/
  </code></pre>
  
  <p>However, <code>product.id</code> is nil at the time of photo creation.</p>
  
  <p>With that in mind, a few questions:</p>
  
  <ul>
  <li>Does the file structure really matter that much or am I over thinking it?</li>
  <li>Should I do something instead where the product is saved first with basic info and then the files are attached on a separate form?</li>
  <li>Is there something I'm overlooking like a way to trigger carrierwave to move the files after the product model is saved?</li>
  <li>From a UI standpoint is it bad practice to have users go thru a multi-step process (in this case for creating a product)?</li>
  </ul>