lib/money/acts_as_money.rb in ShadowBelmolve-money-2.3.1 vs lib/money/acts_as_money.rb in ShadowBelmolve-money-2.3.3

- old
+ new

@@ -22,10 +22,10 @@ # :with_currency => false # :with_cents => true #=> 1000.to_money #=> #<Money @cents=1000> # def has_money(*attributes) config = {:with_currency => true, :with_cents => false, - :allow_nil => true }.update(attributes.extract_options!) + :allow_nil => false }.update(attributes.extract_options!) for attribute in attributes do mapping = [[config[:cents] || "#{attribute}_cents", 'cents']] mapping << [config[:currency] || "#{attribute}_currency", 'currency'] if config[:with_currency]