1 2 3 4
class User < ApplicationRecord has_many :agencies has_many :agents, through: :agencies, source: :agent end