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?

Ghjhdf
  • 161
  • 8

1 Answers1

1

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

hsming
  • 2,468
  • 3
  • 14
  • 14