berthor
unread,Jul 1, 2008, 4:30:58 PM7/1/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ChicagoRuby.org
I've been working on a little home grown project, and i'm not sure how
to add in a bit of logic here.
I have a user, game, server, character, and comments table. but how
would I go about getting all the entries from just one user?
currently I'm joining the table with belongs_to and has_many, and
has_many through in my model. would the easiest way to do this be to
add the user_id to every field in my join tables? example = > gslink
= Game Server join table. right now in this table, i have
game_id:integer and server_id:integer and I was wondering if I should
add a user_id:integer and find all who's user_id = logged in user's id
at the time of displaying the information? or should I do something
else?
thanks in advance.