Siyanda Maphumulo

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Hi, I think I had a simalr issue while dealing with and employee (User) and manger (also User) relationship, my solution was to use a self-jion or self referential association

migration

    add_reference :users, :manager, foreign_key: { to_table: :users }, index: true

model

  belongs_to :manager, class_name: "User"