Lesson

Create Active Record Self-Referential Relationships In Ruby on Rails

If you want to give the users the ability to follow or become friends with each other. Rails lets you create a join table in your database and have it reference the user database table.

Duration
7 min
Access
Free
Transcript
Needs source

If you want to give the users the ability to follow or become friends with each other. Rails lets you create a join table in your database and have it reference the user database table.

You can use Active Record to associate the new table with User table by using the class_name method