views:

46

answers:

1

How should I work with Money with MongoID? Should I configure it as BigDecimal? And at rails level? For ActiveRecord we have something called Money, but AFAIK it just supports AR

+1  A: 

MongoDB stores numbers in various BSON data types (int, long int, double). I recommend you store money as cents (if U.S. currency) and use the long int datatype.

dm