ruby on rails many to many relation between same model objects
Is there a way of creating many to many relations between same model objects?
The idea is that I have a 开发者_如何学Pythonuser model and would like to allow users to link to each other. The end result would be a traceable network of relations and a way to find out the relation between 2 users.
You do it basically like any other many-to-many relation. Here's a Railscast that should give you exactly what you're after.
精彩评论