class Vendor < ApplicationRecord # Many-to-many relationships has_and_belongs_to_many :employers has_many :service_contracts has_many :participants, through: :service_contracts # Validations validates :tin, uniqueness: true, allow_blank: true, presence: true end