Sha256: 87e7087166c1b9c9ed1df22de0b704f9dc49312ab69e416293f3133e88c12859

Contents?: true

Size: 440 Bytes

Versions: 3

Compression:

Stored size: 440 Bytes

Contents

# Represents an email which has been sent to one or more recipients.  This is
# essentially the same as the Message class, but changes how the it is
# delivered.
class Email < Message
  state_machine :state do
    after_transition :on => 'deliver', :do => :deliver_email
  end
  
  private
    # Actually delivers the email to the recipients using ActionMailer
    def deliver_email
      ActionMailer::Base.deliver_email(self)
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
has_emails-0.1.3 app/models/email.rb
has_emails-0.1.4 app/models/email.rb
has_emails-0.2.0 app/models/email.rb