I am new to rails and have to develop a small app which will do regular
social networking.
So, whats the best and efficient way to implement friends/friendship
thing so that I could get complete list of every user’s friends with @user.friends and also which is easy to maintain and implement.
I am new to rails and have to develop a small app which will do regular
social networking.
So, whats the best and efficient way to implement friends/friendship
thing so that I could get complete list of every user’s friends with @user.friends and also which is easy to maintain and implement.
Thanks.
You’ll want to do a self referential ‘has_many :through =>’.
A google search with just the right keywords (eg: self referential
has_many through) should get you all the information you need, and then
some.
I am new to rails and have to develop a small app which will do regular
social networking.
So, whats the best and efficient way to implement friends/friendship
thing so that I could get complete list of every user’s friends with @user.friends and also which is easy to maintain and implement.