lib/backup/notifier/mail.rb in backup-4.1.12 vs lib/backup/notifier/mail.rb in backup-4.2.0
- old
+ new
@@ -146,17 +146,11 @@
# : The backup operation failed.
# : Notification will be sent, including a copy of the current
# : backup log, if `on_failure` is `true`.
#
def notify!(status)
- tag = case status
- when :success then '[Backup::Success]'
- when :warning then '[Backup::Warning]'
- when :failure then '[Backup::Failure]'
- end
-
email = new_email
- email.subject = "#{ tag } #{ model.label } (#{ model.trigger })"
+ email.subject = message.call(model, :status => status_data_for(status))
send_log = send_log_on.include?(status)
template = Backup::Template.new({ :model => model, :send_log => send_log })
email.body = template.result('notifier/mail/%s.erb' % status.to_s)