Sha256: 2b151156d943ecbc18dbcdcba957609a68d30c9633072f4b6389019015e5538e

Contents?: true

Size: 811 Bytes

Versions: 2

Compression:

Stored size: 811 Bytes

Contents

#
# This looks like it sends a single email?
#

class Ish::EmailContext
  include Mongoid::Document
  include Mongoid::Timestamps

  PAGE_PARAM_NAME = 'email_contexts_page'

  FROM_EMAILS = %w| piousbox@gmail.com victor@piousbox.com victor@wasya.co no-reply@piousbox.com |
  field :from_email
  validates_presence_of :from_email
  def self.from_email_list
    [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
  end

  field :to_email
  validates_presence_of :to_email

  field :subject
  validates_presence_of :subject

  field :body
  # validates_presence_of :body ## With plain type, there is no body but there are variables for templating.

  belongs_to :email_template

  field :rendered_str

  field :sent_at, type: DateTime

  #
  # For templating:
  #
  field :name

end
EmailContext = Ish::EmailContext

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ish_models-0.0.33.183 lib/ish/email_context.rb
ish_models-0.0.33.182 lib/ish/email_context.rb