BigDecimal - always change own value after reloading site page

hello all. I was noticed that BigDecimal attribute in my db row changing every reloading.

sum: #BigDecimal:4add7d0,‘0.9E0’,9(36)

ctrl+r

sum: #BigDecimal:639f200,‘0.9E0’,9(36)

ctrl+r

sum: #BigDecimal:594ceb0,‘0.9E0’,9(36)

Is it ok?

The values you see changing, like “4add7d0” aren’t actually the decimal value, they are the “address”. The actual decimal value is .9E0 so between each of those the value is the same. See http://www.ruby-doc.org/stdlib-2.1.1/libdoc/bigdecimal/rdoc/BigDecimal.html#method-i-inspect for more information. Try using “.to_s” to see just the decimal value.