ah right. So it is a user defined model. Am I right?

On 16 August 2010 20:36, AppleII717 <[email protected]> wrote:

> line_items is a model/table.
>
> class LineItem < ActiveRecord::Base
>  belongs_to :cart
>  belongs_to :product
>
>  def full_price
>    unit_price * quantity
>  end
> end
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to