Sha256: 2a2a3df65118267054f8d9d531b1058773c7cf142e28ecfa9549de4d35a4bbb1

Contents?: true

Size: 515 Bytes

Versions: 5

Compression:

Stored size: 515 Bytes

Contents

class NotificationMailer < NotifyOn::NotificationMailer

  def notify(notification_id, template = 'notify')
    @notification = NotifyOn::Notification.find_by_id(notification_id)
    @recipient = @notification.recipient
    @sender = @notification.sender
    @trigger = @notification.trigger
    mail :to => @recipient.email,
         :from => 'Bob Ross <admin@bobross.com>',
         :subject => @notification.description,
         :template_path => 'notifications',
         :template_name => template
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
notify_on-1.0.5 spec/dummy/app/mailers/notification_mailer.rb
notify_on-1.0.4 spec/dummy/app/mailers/notification_mailer.rb
notify_on-1.0.3 spec/dummy/app/mailers/notification_mailer.rb
notify_on-1.0.2 spec/dummy/app/mailers/notification_mailer.rb
notify_on-1.0.1 spec/dummy/app/mailers/notification_mailer.rb