I have a Friends
model with user_id
and friend_id
...both are id's back to specific users.
What I'd like to able to do is something like this:
@relationship = Friend.find_by_user_id(current_user.id)
@relationship.friend.username
Where I can basically pull the user through the friend_id
column in the same way I can do @relationship.user.username
.
How would I setup my associations to pull that off?