search for: commission_c

Displaying 1 result from an estimated 1 matches for "commission_c".

Did you mean: commission
2006 Feb 28
12
Examples for Money library ?
...of their Money implementation ? I''m trying to setup a Model to use this library, but can''t seem to wrap my head around how it is exactly supposed to work. My Model (Foo) looks like: =============== composed_of :commission, :class_name => "Money", :mapping => [ %w(commission_cents cents), %w(commission_currency currency) ] Yet, in script/console, I''m unable to get the correct behaviour (at least I think), from the library. =============== >> t = Foo.new(:commission => 34) NoMethodError: undefined method `cents'' for 34:Fixnum from (eval...