Hi,
I''m obviously doing something stupid, but I''m trying to figure
out how
the Money library (http://dist.leetsoft.com/api/money/) is supposed to
work. I have a Product model and I want to have an attribute in my
model called "price" and I want it to accept Money objects.
So I have this in my Product model.
class Product < ActiveRecord::Base
composed_of :price, :class_name => ''Money''
end
>From what I can tell, I should be able to do:
p = Product.new
p.price = Money.new(1999)
and have the price return a Money object?
I can''t get this to work. What am I doing wrong? Is this how Money is
supposed to work?
Thanks for any help,
Jord