Class: Decidim::RoleAssignedToAssemblyEvent

Inherits:
Events::SimpleEvent
  • Object
show all
Includes:
Events::AuthorEvent, Events::NotificationEvent
Defined in:
app/events/decidim/role_assigned_to_assembly_event.rb

Instance Method Summary collapse

Instance Method Details

#i18n_optionsObject



16
17
18
19
20
21
22
23
24
25
26
# File 'app/events/decidim/role_assigned_to_assembly_event.rb', line 16

def i18n_options
  {
    resource_path: resource_path,
    resource_title: resource_title,
    resource_url: resource_url,
    scope: event_name,
    participatory_space_title: participatory_space_title,
    participatory_space_url: participatory_space_url,
    role: i18n_role
  }
end

#i18n_roleObject



12
13
14
# File 'app/events/decidim/role_assigned_to_assembly_event.rb', line 12

def i18n_role
  I18n.t(extra["role"], scope: "decidim.admin.models.assembly_user_role.roles", default: extra["role"])
end

#notification_titleObject



8
9
10
# File 'app/events/decidim/role_assigned_to_assembly_event.rb', line 8

def notification_title
  I18n.t("notification_title", **i18n_options).html_safe
end