Think I am on the right track as I can attain the cost through the 
console but the way to handle the method is what I dont get and where to 
put it and when to call it

>> a = Allocation.first
=> #<Allocation id: 1, company_id: 1, allocated_product_id: 1, quantity: 
2, saledate: nil>
>> a.allocated_product.cost
=> #<BigDecimal:b6f12d20,'0.2222E4',4(12)>

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to