Module: App47EmailSendable

Extended by:
ActiveSupport::Concern
Included in:
User
Defined in:
lib/models/concerns/app47_email_sendable.rb

Overview

Objects that emails can be sent too…

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/models/concerns/app47_email_sendable.rb', line 9

def self.included(base)
  base.class_eval do
    field :email, type: String
    field :email_bounce_date, type: Time
    field :email_bounce_reason, type: String
    field :unconfirmed_email, type: String
    field :email_enabled, type: Mongoid::Boolean, default: true

    before_validation :downcase_email
  end
end