rails/rails — pull request #8562 by wdgraybill (2012-12-19 22:11:37+00:00)
Title: Decimal fields changed from zero to zero string marked as changed

Decimal fields with an old value of 0.0 that are changed to a string representation of zero ('0.0', '0.000', etc.) are included in changed_attributes.

numeric_data = NumericData.new
numeric_data.bank_balance = 0.0
numeric_data.save!

numeric_data.bank_balance = '0.0'
numeric_data.changed_attributes # => {"bank_balance"=>#}