Class: UserNotif::Notif

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/user_notif/notif.rb

Instance Method Summary collapse

Instance Method Details

#email?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/user_notif/notif.rb', line 13

def email?
  true
end

#email_options(opts = {}) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/user_notif/notif.rb', line 21

def email_options(opts = {})
  {
    subject: I18n.t('notif.generic.subject'),
    bcc: UserNotif.mailer_bcc,
    return_path: UserNotif.mailer_return_path,
    from: UserNotif.mailer_sender,
    reply_to: UserNotif.mailer_reply_to,
    cc: UserNotif.mailer_cc,
    date: Time.current
  }.merge(opts)
end

#target_classObject



33
34
35
# File 'lib/user_notif/notif.rb', line 33

def target_class
  nil # Has to be overriden
end

#template_nameObject



17
18
19
# File 'lib/user_notif/notif.rb', line 17

def template_name
  'generic_notif'
end