what is "line_items"?

1 view
Skip to first unread message

ct9a

unread,
Aug 16, 2010, 2:20:06 AM8/16/10
to Ruby on Rails: Talk
hi guys,
I am looking at http://railscasts.com/episodes/141-paypal-basics and
I am trying to figure out what's line_items?

Is it a reserved keyword representing a row of a multi row form or is
it just a variable that's called line_items (and is not a reserved
keyword)?

If it is a reserved keyword/function in rails, can someone please
point me to some documentation?

thanks

Gordon

AppleII717

unread,
Aug 16, 2010, 6:36:25 AM8/16/10
to Ruby on Rails: Talk
line_items is a model/table.

class LineItem < ActiveRecord::Base
belongs_to :cart
belongs_to :product

def full_price
unit_price * quantity
end
end

Gordon Yeong

unread,
Aug 16, 2010, 6:43:48 AM8/16/10
to rubyonra...@googlegroups.com
ah right. So it is a user defined model. Am I right?

Conrad Taylor

unread,
Aug 16, 2010, 10:20:23 AM8/16/10
to rubyonra...@googlegroups.com
Yes, it's a user defined model.

-Conrad
--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Reply all
Reply to author
Forward
0 new messages