开发者

Groups of users

I have small project with users, users posts, friendships, comments. I want to make groups of users. Can you help me make it? or send to make links to tutorials or books. thank开发者_开发技巧 u so much


It sounds like you want a many-to-many relationship. There are two ways to do this, and this railscasts episode describes them (note that it is for Rails 2.x but the general idea carries over to Rails 3).

I'd also recommend looking at these two guides:

  • The has_and_belongs_to_many Association
  • The has_many :through Association
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜