Module: Emails::AdminNotification

Included in:
Notify
Defined in:
app/mailers/emails/admin_notification.rb

Instance Method Summary collapse

Instance Method Details

#send_admin_notification(user_id, subject, body) ⇒ Object


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

def send_admin_notification(user_id, subject, body)
  user = User.find(user_id)
  email = user.notification_email_or_default
  @unsubscribe_url = unsubscribe_url(email: Base64.urlsafe_encode64(email))
  @body = body
  mail to: email, subject: subject
end

#send_unsubscribed_notification(user_id) ⇒ Object


13
14
15
16
17
# File 'app/mailers/emails/admin_notification.rb', line 13

def send_unsubscribed_notification(user_id)
  user = User.find(user_id)
  email = user.notification_email_or_default
  mail to: email, subject: "Unsubscribed from GitLab administrator notifications"
end