On Sun, Jul 27, 2008 at 12:09 AM, Pepe Sanchez
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:>
> I am working with the book agile Web Development second edition, and in
> page 110 there is an example i how to create the model CartItem.
>
>
> I am using rails 2.0 and after adding the class CartItem I get an error
> at the constructor Initialize
>
> class CartItem < ActiveRecord::Base
Check the example again - CartItem doesn''t inherit from ActiveRecord.
Barry
> attr_reader :product, :quantity
>
> def initialize(product)
> @product = product
> @quantity = 1
> end
>
>
> it underlines the word "initialize" and says "Subclass does
not call
> super in constructor"
> --
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---