1 => Добавить миграционный столбец добавления manager_id
в Employee
rails g migration add_manager_id_to_employee manager_id:integer
2 => Модель самообращения к сотруднику
class Employee < ApplicationRecord
belongs_to :manager, optional: true
has_many : subordinates, :class_name => "Employee", :foreign_key => "manager_id"
end
3 =>
class Approval < ApplicationRecord
belongs_to :employee
has_one :manager, { where("employees.manager_id= nil ") }
has_one :subordinate, { where("employees.manager_id= self.employee_id") }
end