Skip to content

Commit

Permalink
Added :allow_nil => true option back to composed_of call
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Nov 20, 2008
1 parent b0269e9 commit 378651e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/money/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def money(name, options = {})
options = {:cents => "#{name}_in_cents".to_sym}.merge(options)
mapping = [[options[:cents].to_s, 'cents']]
mapping << [options[:currency].to_s, 'currency'] if options[:currency]
composed_of name, :class_name => 'Money', :mapping => mapping,
composed_of name, :class_name => 'Money', :mapping => mapping, :allow_nil => true,
:converter => lambda{|m| m.to_money}
end
end
Expand Down

0 comments on commit 378651e

Please sign in to comment.