title: Rails - how to setup create action to make multiple associations?
body: <p>I think this is a pretty simple question, but I have an app that has User, Product, and Review models.</p>
  
  <p>When a user creates a new review for a product, I currently have this in my create action for Review:</p>
  
  <pre><code>@review = @product.reviews.new(params[:review])
  </code></pre>
  
  <p>This works fine, but the review is associated with the product only and I also want to associate it with the creating user. However, if I do something like this:</p>
  
  <pre><code>@review = @product.reviews.new(params[:review])
  @review = current_user.reviews.new(params[:review])
  </code></pre>
  
  <p>Would it create two instances of the review that are separate records? How could I do multiple associations like this with only one @review variable?</p>
  
  <p>Just to note, I am not using polymorphic associations because as I understand it, I don't need to allow @review to belong to EITHER a product or user, as I always want to associate it with both.</p>
  
  <p>Thus, in my Review model I have:</p>
  
  <pre><code>t.integer  :product_id
  t.integer  :user_id
  </code></pre>
  
  <p>and my models look this:</p>
  
  <p>Product:</p>
  
  <pre><code>has_many :reviews
  </code></pre>
  
  <p>User:</p>
  
  <pre><code>has_many :reviews
  </code></pre>
  
  <p>Review:</p>
  
  <pre><code>belongs_to :user
  belongs_to :product
  </code></pre>
  
  <p>First, is this setup correct? Am I right in not using polymorphic associations? If so, how can I write my controller code to do what I want?</p>