title: Rails decimal (currency) number not saving when the scale part changes
body: <p>I have a price field in Rails created as a decimal with precision 8 and scale 2 (or numeric(8,2) in Postgres). When I try to update the scale part, it generates an empty transaction, but I cannot understand why. Any idea on what is going on?</p>
  
  <p>Console outputs:</p>
  
  <pre><code>irb(main):051:0&gt; puts o.price
  8.0
  =&gt; nil
  
  irb(main):052:0&gt; o.price = "8,22"
  =&gt; "8,22"
  
  irb(main):053:0&gt; puts o.price
  8.22
  =&gt; nil
  
  irb(main):054:0&gt; o.save
     (0.5ms)  BEGIN
     (0.4ms)  COMMIT
  =&gt; true
  
  irb(main):055:0&gt; o.reload; puts o.price    
  8.0
  =&gt; nil
  </code></pre>
  
  <p><strong>EDIT:</strong> Updating the whole number works normally, the problem only appears when updating the scale part:</p>
  
  <pre><code>irb(main):017:0* puts o.price
  8.0
  =&gt; nil
  
  irb(main):018:0&gt; o.price = "9,22"
  =&gt; "9,22"
  
  irb(main):019:0&gt; o.save
     (0.4ms)  BEGIN
     (0.9ms)  UPDATE "order_items" SET "price" = 9.22, "updated_at" = '2014-01-10 20:17:31.753908' WHERE "order_items"."id" = 1469
     (22.1ms)  COMMIT
  =&gt; true
  
  irb(main):020:0&gt; o.reload; puts o.price
  9.22
  =&gt; nil
  </code></pre>
  
  <p><strong>EDIT 2:</strong> Also tested with others decimals ( 8,22 => 8,44) and it works. The problem occurs when the price is rounded to 0 ( 8,00 => 8,22 doesn't update)</p>