Store different kind of actions (Like ❤️, Follow 👁, Star ⭐, Block ...) in one table via ActiveRecord Polymorphic Association.
- follow
- followers
- likes
- watch
47,133 repositories indexed
1–2 of 2 · Most stars
Store different kind of actions (Like ❤️, Follow 👁, Star ⭐, Block ...) in one table via ActiveRecord Polymorphic Association.
One database for user-user (follows), user-item (likes), and item-item (related items) interactions — precomputed at write time, served as simple lookups