20 lines
334 B
Ruby

# Copyright (C) 2024 Manuel Bustillo
class Guest < ApplicationRecord
belongs_to :group
enum status: {
considered: 0,
invited: 10,
confirmed: 20,
declined: 30,
tentative: 40
}
scope :potential, -> { where.not(status: %i[declined considered]) }
def full_name
"#{first_name} #{last_name}"
end
end