Displaying 1 result from an estimated 1 matches for "commission_currency".
2006 Feb 28
12
Examples for Money library ?
...on ?
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):3:in `commission=''
I...