class Worker < ApplicationRecord # One-to-many relationship with Participants has_many :participants, through: :employments has_many :employments # Many-to-many relationship with Employers through Participants has_many :employers, through: :participants end