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
13
# File 'lib/notify_user/channels/action_mailer/action_mailer_channel.rb', line 5

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

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



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

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

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



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

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