Class: Pling::ActionMailer::Mailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
lib/pling/action_mailer/mailer.rb

Instance Method Summary collapse

Instance Method Details

#pling_message(message, device, configuration) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/pling/action_mailer/mailer.rb', line 8

def pling_message(message, device, configuration)
  @message, @device, @configuration = message, device, configuration

  mail(:to => device.identifier, :from => configuration[:from], :subject => message.subject) do |format|
    format.text { render 'pling/mailer/pling_message' } if configuration[:text]
    format.html { render 'pling/mailer/pling_message' } if configuration[:html]
  end
end