Class: Notifications::ContactsBirthday

Inherits:
Notification show all
Defined in:
app/models/notifications/contacts_birthday.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Notification

concatenate_or_create, create_notification, #email_the_user, for, #linked_object, #set_read_state

Methods included from Diaspora::Fields::Guid

included, #set_guid

Class Method Details

.notify(contact, _recipient_user_ids) ⇒ Object


13
14
15
16
17
# File 'app/models/notifications/contacts_birthday.rb', line 13

def self.notify(contact, _recipient_user_ids)
  recipient = contact.user
  actor = contact.person
  create_notification(recipient, actor, actor).try(:email_the_user, actor, actor)
end

Instance Method Details

#mail_jobObject


5
6
7
# File 'app/models/notifications/contacts_birthday.rb', line 5

def mail_job
  Workers::Mail::ContactsBirthday
end

9
10
11
# File 'app/models/notifications/contacts_birthday.rb', line 9

def popup_translation_key
  "notifications.contacts_birthday"
end