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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
line_items is a model/table.
class LineItem < ActiveRecord::Base
belongs_to :cart
belongs_to :product
def full_price
unit_price * quantity
end
end
On Aug 16, 1:20 am, ct9a
<anexi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> hi guys,
> I am looking athttp://railscasts.com/episodes/141-paypal-basicsand
> 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
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
ah right. So it is a user defined model. Am I right? On 16 August 2010 20:36, AppleII717 <salex-ee4meeAH724@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes, it''s a user defined model. -Conrad On Aug 16, 2010, at 3:43 AM, Gordon Yeong <anexiole-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> ah right. So it is a user defined model. Am I right? > > > On 16 August 2010 20:36, AppleII717 <salex-ee4meeAH724@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.