Daniel,

thank you so much, now I have the message

NameError in Shoppingcart#my_shopping_cart

Showing app/views/shoppingcart/my_shopping_cart.rhtml where line #25 
raised:

uninitialized constant Shopping_cart::ShoppingCartItems
Extracted source (around line #25):

23:   <% if @my_cart
24:
25:     for shopping_cart_item in @my_cart_items.shopping_cart_items %>
26:     <tr>

My shoppingcart.rb is

class Shopping_cart < ActiveRecord::Base
  belongs_to :owner,
    :class_name => "user",
    :foreign_key => "owner_id"

  has_many :shopping_cart_items,
    :class_name => "ShoppingCartItems",
    :finder_sql => "select ti.* from shopping_cart_items ti, 
shopping_carts t where ti.owner_id = t.owner_id"
end


and my shoppingcartitem.rb defines

class ShoppingCartItem

I feel like I'm close, but I can't figure this out.  Can you figure out 
the missing link?
-- 
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 [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