class Wedding < ActiveRecord::Base has_many :events has_many :guests has_one :spouse_a, -> { order(name_order: :asc) }, class_name: 'Spouse' has_one :spouse_b, -> { order(name_order: :desc) }, class_name: 'Spouse' end