开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜