Skip to content

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 ​

ColumnTypeNotes
emailstringrequired
user_idbiginthost app User, optional
suppressed_attimestampsee Suppressible
suppression_reasonintegerenum, see Suppressible

Included concerns ​

Suppressible

Associations ​

  • belongs_to :user, class_name: "::User", optional: true
  • has_many :subscriptions, dependent: :destroy → Subscription
  • has_many :lists, through: :subscriptions → List
  • has_many :dispatches, dependent: :destroy → Dispatch

Validations ​

  • email presence

Creating from a User ​

See init_subscriber.

Released under the MIT License.