-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
I'm not sure if it is the expected behavior, but I think it's really strange :
class Item include Mongoid::Document field :price, type: BigDecimal end
Item.create price: 12
# price is stored as an Int in MongoDB
Item.create price: 12.5
# price is stored as a Double in MongoDB
Item.create price: BigDecimal.new('12.5') # price is stored as a String in MongoDB (as expected)