Guest User

Untitled

a guest
Feb 19th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. >> a = Account.new(:name => "Test Account", :initialBalance => 9.999)
  2. => #<Account id: nil, name: "Test Account", created_at: nil, updated_at: nil, initialBalance: #<BigDecimal:b6f889a8,'0.9999E1',8(8)>>
  3. >> a.initialBalance.to_s
  4. => "9.999"
  5. >> a.save
  6. => true
  7. >> a.initialBalance.to_s
  8. => "9.999"
  9. >> a.initialBalance = 12345678901234567890
  10. => 12345678901234567890
  11. >> a.initialBalance.to_s
  12. => "12345678901234567890.0"
Add Comment
Please, Sign In to add comment