title: Rails transaction: does it matter on which ActiveRecord model class?
body: <p>When I have 2 objects to save inside a transaction  </p>
  
  <pre><code>a = A.new(...)  
  b = B.new(...)
  </code></pre>
  
  <p>Does it matter on which model class I invoke the transaction method?</p>
  
  <pre><code>A.transaction do
    a.save
    b.save
  end
  </code></pre>
  
  <p>or</p>
  
  <pre><code>B.transaction do
    a.save
    b.save
  end
  </code></pre>
  
  <p>IMNO both use the same db transaction, because ActiveRecord can only handle one connection, thus it should not matter. Is that correct?</p>
  
  <p>Thanks,
  Alex.</p>