README.rdoc in dm-money-0.1.3 vs README.rdoc in dm-money-0.1.4

- old
+ new

@@ -5,10 +5,12 @@ BigMoney backed DataMapper money properties. == Todo * Validations. +* Precision and scale options should also be applied to underlying BigMoney/BigDecimal amount. +* A rounding mode option, see BigDecimal#mode. == Synopsis === Basic @@ -44,14 +46,26 @@ # # property :price_amount, BigDecimal, accessor: private, required: true # property :price_currency, String, accessor: private, required: true, length: 3 end +== Precision and Scale + +"The SQL standard requires a default scale of 0, i.e. coercion to integer precision. We find this a bit useless. If +you're concerned about portability, always specify the precision and scale explicitly." -- PostgreSQL Documentation. + +DataMapper's bread and butter is SQL and old school relational databases so unsurprisingly a default numeric/decimal +scale of 0 is used (where the default precision comes from I do not know). + +If you require any fractional money amounts remember to explicitly set the precision and scale options for each money +property. + == Install * Via git: git clone git://github.com/shanna/dm-money.git + cd dm-money && rake install * Via gem: gem install dm-money