1 2 3 4
class Agent < ApplicationRecord has_many :agencies has_many :members, through: :agencies, source: :user end