You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Utah Ruby Users Group
Hey Group,
I'm hoping someone can lend their expertise to my question. I'm trying
to re-create a piece of functionality that we used in the media_lender
app this summer. It revolves around that apps ability to send an
invitation to a friend. I'm trying to figure out how the app populates
the "friendships" table with the friend_id and the user_id?
I think it has to do with the "inverse" relationships, but I'm not
sure. I couldn't find any code that actually created a record.
If someone has a moment I would love a brief explanation.
Many Thanks!
Chris
Jenica Jacobsen
unread,
Nov 19, 2009, 1:56:31 PM11/19/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ur...@googlegroups.com
I think it has to do with the has_many calls in user.rb and the belongs_to calls in friendship.rb, in the model. Then activeRecord takes care of adding the join records. I'm not an expert though :)