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

  has_many :shopping_cart_items,
    :class_name => "shopping_cart_item",
    :finder_sql => "select ti.* from shopping_cart_items ti, 
shopping_carts t
        where ti.owner_id = t.owner_id"
end
-- 
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