Hi all, I am new to ROR3 and would really appreciate some advice on how to define the following model association:
Game model - has host_userid and visitor_userid as fields to define the two players engaged in the game. this two fields are of type User and need to be mapped via foreign key relationship. User model - a user object can belong to one or more games (as I imagine .. I would fetch that by querying the Games table where the host_userid or visitor_userid equal to the userid in question) if anyone could post a code snippet to define such associations Id be really grateful :) -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.