Sha256: 715ec573e681b5aa859e0af8dd0cd1cea8c4d182fa21e1e3676a9590822c4cef

Contents?: true

Size: 439 Bytes

Versions: 4

Compression:

Stored size: 439 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

4 entries across 4 versions & 2 rubygems

Version Path
pluginaweek-has_emails-0.3.0 app/models/email.rb
has_emails-0.3.1 app/models/email.rb
has_emails-0.2.1 app/models/email.rb
has_emails-0.3.0 app/models/email.rb