Taking Ryan Bates' asciicast as an example: http://asciicasts.com/episodes/163-self-referential-association
He ends with two associations of User
- :friends
- :inverse_friends
Given that a user would not care who instigated the friendship, you would want a User association that was simply
- :friends
that consisted of both relationships. i.e Relationships instigated by the user and relationships instigated by the user's friend.
So how can you achieve this bidirectional self-referential association?
UPDATE - Josh Susser has a post about this here: http://blog.hasmanythrough.com/2006/4/21/self-referential-through
However, it still talks about has_many :sources and has_many :sinks when really there should be a has_many :nodes that includes both the sources and the sinks.