16 lines
279 B
Ruby
Raw Normal View History

2024-10-27 21:42:45 +00:00
# Copyright (C) 2024 Manuel Bustillo
2024-07-11 20:08:26 +02:00
class Guest < ApplicationRecord
belongs_to :group
2024-08-11 19:24:24 +02:00
enum :status, {
2024-08-11 19:24:24 +02:00
considered: 0,
invited: 10,
confirmed: 20,
2024-10-27 19:25:24 +01:00
declined: 30,
tentative: 40
2024-08-11 19:24:24 +02:00
}
scope :potential, -> { where.not(status: %i[declined considered]) }
2024-07-11 20:08:26 +02:00
end