I have a model, which is called delivery:
property: id, Serial property: created_at, datetime property: updated_at, datetime property: price, bigdiskim ,: exact => 10 ,: scale = & gt; Delivery is the price, which is seen in SQLite when prices like 5.49, 6.95, 4.95 are while displaying this information in the output (coded in HAM), the value from delivery.price is 0.695 E1, 0.495 e 1 are displayed like
Any idea why they are being shown in this format, and how to display them correctly, 'can display correctly.
Conversions (in all strings) takes a format parameter:
& gt; & Gt; N = BigDevelop.New ('5.49') = & gt; # & Lt; BigDecimal: 100502958, '0.549E1', 18 (18) & gt; & Gt; & Gt; N.to_s = & gt; "0.549 E1" & gt; & Gt; N.to_s ('F') = & gt; "5.49"
Comments
Post a Comment