0

I am a novice of Rails. And I wanna create a tiny SNS like Twitter.
How to implement the follower system with AciveRecord in has_and_belongs_to_many?
I create a "User" table. And the follower relationship is a many-to-many logic between one user and one user.
So how to decelerate the model class and create the join table?

1

1 Answer 1

1

The last chapter of railstutorial is talking about what you want. http://ruby.railstutorial.org/chapters/following-users#top

1
  • Thanks! It's a useful book!
    – Ghjhdf
    Mar 25, 2013 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.