Class: ActionMailerChannel

Inherits:
Object
  • Object
show all
Defined in:
lib/notify_user/channels/action_mailer/action_mailer_channel.rb

Class Method Summary collapse

Class Method Details

.default_optionsObject



5
6
7
8
9
10
11
12
# File 'lib/notify_user/channels/action_mailer/action_mailer_channel.rb', line 5

def default_options
  {
    subject: "New Notification",
    aggregate: {
      subject: "New Notifications"
    }
  }
end

.deliver(notification, options = {}) ⇒ Object



14
15
16
# File 'lib/notify_user/channels/action_mailer/action_mailer_channel.rb', line 14

def deliver(notification, options={})
  NotifyUser::NotificationMailer.notification_email(notification, default_options.deep_merge(options)).deliver
end

.deliver_aggregated(notifications, options = {}) ⇒ Object



18
19
20
# File 'lib/notify_user/channels/action_mailer/action_mailer_channel.rb', line 18

def deliver_aggregated(notifications, options={})
  NotifyUser::NotificationMailer.aggregate_notifications_email(notifications, default_options.deep_merge(options)).deliver
end