Class: Decidim::WelcomeNotificationEvent

Inherits:
Events::SimpleEvent
  • Object
show all
Includes:
TranslationsHelper
Defined in:
app/events/decidim/welcome_notification_event.rb

Instance Method Summary collapse

Methods included from TranslationsHelper

empty_translatable, ensure_translatable, multi_translation, translated_in_current_locale?

Methods included from TranslatableAttributes

#attachment?, #default_locale?

Instance Method Details

#bodyObject



14
15
16
# File 'app/events/decidim/welcome_notification_event.rb', line 14

def body
  interpolate(organization.welcome_notification_body.symbolize_keys[I18n.locale])
end

#email_greetingObject



22
# File 'app/events/decidim/welcome_notification_event.rb', line 22

def email_greeting; end

#email_introObject



24
25
26
# File 'app/events/decidim/welcome_notification_event.rb', line 24

def email_intro
  body
end

#email_outroObject



28
# File 'app/events/decidim/welcome_notification_event.rb', line 28

def email_outro; end

#email_subjectObject



18
19
20
# File 'app/events/decidim/welcome_notification_event.rb', line 18

def email_subject
  subject
end

#notification_titleObject



30
31
32
# File 'app/events/decidim/welcome_notification_event.rb', line 30

def notification_title
  ("<p><strong>#{subject}</strong></p>" + body).html_safe
end

#resource_pathObject



34
35
36
# File 'app/events/decidim/welcome_notification_event.rb', line 34

def resource_path
  nil
end

#resource_titleObject



38
39
40
# File 'app/events/decidim/welcome_notification_event.rb', line 38

def resource_title
  nil
end

#subjectObject



10
11
12
# File 'app/events/decidim/welcome_notification_event.rb', line 10

def subject
  interpolate(organization.welcome_notification_subject.symbolize_keys[I18n.locale])
end