Users has_many Users (friends)

How can I use a
User has_many Users?
my model is called Friends user_id friend_id
so a User can add a User as a friend

On Apr 26, 2011, at 8:05 PM, Tomas R. wrote:

How can I use a
User has_many Users?
my model is called Friends user_id friend_id
so a User can add a User as a friend

There’s a Railscast about this:
http://railscasts.com/episodes/163-self-referential-association

Walter

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs