Subscriber
A person who has opted in to receiving emails or has been added manually, optionally associated with a User from the host app.
Columns
| Column | Type | Notes |
|---|---|---|
email | string | required |
user_id | bigint | host app User, optional |
suppressed_at | timestamp | see Suppressible |
suppression_reason | integer | enum, see Suppressible |
Included concerns
Associations
belongs_to :user, class_name: "::User", optional: truehas_many :subscriptions, dependent: :destroy→ Subscriptionhas_many :lists, through: :subscriptions→ Listhas_many :dispatches, dependent: :destroy→ Dispatch
Validations
emailpresence
Creating from a User
See init_subscriber.