Hi I''m making a book website, and I want to verify that I''m
getting this
right.
First 1. are the users (modeled exactly from the login engine plugin)
                                                       (no _id column)
then  2. the inventories,
                                                       (no _id column)
      3. then the ads,
(with a inventory_id column, mypage_id, user_id, what you would call a 
''first class model'')
and now I tie it all into
      4. a MyPage where all their ads are listed.
Ok.. quick breather..
I would then declare my models the following way:
1. users
has_many :inventories, :through => :ads
has_one :mypage
2. inventories
has_many :users, :through => :ads
3.ads
# no relationships declaration needed
4. mypage
has_many :inventories, :through => ads
belongs_to :user
How does this look? Am I missing anything?
Thanks for anyone that replies.
-- 
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
-~----------~----~----~----~------~----~------~--~---