title: Conversion of Money attributes using update_attributeS for money gem
body: <p>Please consider  two objects of class Product:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base {
    :id =&gt; :integer,
    :name =&gt; :string,
    :total_stock =&gt; :integer,
    :cents_retail_sale_amount =&gt; :integer,
    :cents_cost_amount =&gt; :integer,
    :created_at =&gt; :datetime,
    :updated_at =&gt; :datetime
  }
  </code></pre>
  
  <p>Let's say I have 2 objects:</p>
  
  <pre><code>  a{
    :id =&gt; 12,
    :name =&gt; "Shirt",
    :total_stock =&gt; 1,
    :cents_retail_sale_amount =&gt; 2500,
    :cents_cost_amount =&gt; 2100,
    :created_at =&gt; Mon, 23 Jul 2012 16:16:33 CDT -05:00,
    :updated_at =&gt; Mon, 23 Jul 2012 17:24:15 CDT -05:00}
  
    b {
    :id =&gt; nil,
    :name =&gt; "Polo Shirt",
    :total_stock =&gt; 1,
    :cents_retail_sale_amount =&gt; 2500,
    :cents_cost_amount =&gt; 2100,
    :created_at =&gt; Mon, 23 Jul 2012 16:16:33 CDT -05:00,
    :updated_at =&gt; Mon, 23 Jul 2012 17:24:15 CDT -05:00}
  </code></pre>
  
  <p>Now here is what I'm trying to do:</p>
  
  <pre><code>a.update_attributes(b.to_product.attributes.except("id", "created_at", "updated_at")
  </code></pre>
  
  <p>The problem however ( which I caught only cause I have a validation on the cents fields - to allow amounts only between 0 and $100 ( 10000 cents)), is this - my cents fields get also updated and get extra 00 at the end - so I get $2500 &amp; $2100 for the the retail and cost amounts. While really nice profit margin - not really realistic.</p>
  
  <p>I can obviously do some kind of processing on the b object before updating attributes ( such as not updating money fields and do the separately one by one), but that's not really efficient. So I'm wondering if I'm doing something wrong</p>
  
  <p>Thanks </p>