Class: Notifly::NotificationMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/notifly/notification_mailer.rb

Instance Method Summary collapse

Instance Method Details

#notifly(to: nil, notification_id: nil, template: nil) ⇒ Object



5
6
7
8
9
10
11
# File 'app/mailers/notifly/notification_mailer.rb', line 5

def notifly(to: nil, notification_id: nil, template: nil)
  if defined? Delayed::Job or defined? Sidekiq::Worker
    delay.send_notification(to, notification_id, template)
  else
    send_notification(to, notification_id, template).deliver
  end
end