Skip to content

Override Default Email Message

Sean C Davis edited this page Sep 5, 2016 · 5 revisions

NotifyOn has a very basic email template that uses the description to notify the to in your notify_on configuration.

You may override this default behavior with a custom email template. You specify this using the template option.

:email => { :template => 'my_custom_email_message' }

The template file goes in app/views/notifications and should match the name in your specified option (e.g. my_custom_email_message.html.erb).

Within this template, you have access to the following instance variables:

  • @notification as the notification object
  • @recipient as @notification.recipient
  • @sender as @notification.sender
  • @trigger as @notification.trigger
Clone this wiki locally