Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-2141

BigDecimal: assign empty string and type is now String

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I have a class with BigDecimal field
      field :amount, :type => BigDecimal

      Initializing it:
      item = LineItem.new
      item.amount = ''
      item.save

      puts item.amount.class in console prints 'String'

      I am using Rails 3.2.3, Ruby 1.9.3 and not the latest mongoid: 2.4.10 so let me know if this was fixed

            Assignee:
            Unassigned Unassigned
            Reporter:
            mb-dev mb-dev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: