title: Rails: Copying attributes from an object to another using the "attributes" method
body: <p>Let model <code>Quote</code> have attributes <code>[price, description]</code></p>
  
  <p>Let model <code>Invoice</code> have attributes <code>[price, description, priority]</code></p>
  
  <p>Let <code>invoice</code> an object from Model <code>Invoice</code> with attributes <code>{price: 10, description: 'lamp', priority: 10}</code></p>
  
  <pre><code>invoice = {price: 10, description: 'lamp', priority: 10}
  </code></pre>
  
  <p>Let's say I want to copy <code>invoice</code> attributes to a new <code>quote</code>.</p>
  
  <pre><code>quote = Quote.new(invoice.attributes)
  </code></pre>
  
  <p>This raises an error that <code>priority</code> does not existe in model <code>Quote</code>.</p>
  
  <p>How do I copy <code>invoice</code> attributes to a new <code>quote</code> but only the attributes that a <code>quote</code> can accept?</p>