Class: Decidim::TrustedIds::Verifications::SuccessNotification
- Inherits:
-
Events::SimpleEvent
- Object
- Events::SimpleEvent
- Decidim::TrustedIds::Verifications::SuccessNotification
- Defined in:
- app/events/decidim/trusted_ids/verifications/success_notification.rb
Direct Known Subclasses
Instance Method Summary collapse
- #authorization ⇒ Object
- #handler_name ⇒ Object
- #resource_path ⇒ Object
- #resource_title ⇒ Object
- #resource_url ⇒ Object
Instance Method Details
#authorization ⇒ Object
25 26 27 28 29 |
# File 'app/events/decidim/trusted_ids/verifications/success_notification.rb', line 25 def return unless resource.is_a? Decidim::Authorization @authorization ||= resource end |
#handler_name ⇒ Object
17 18 19 |
# File 'app/events/decidim/trusted_ids/verifications/success_notification.rb', line 17 def handler_name I18n.t("decidim.authorization_handlers.#{&.name}.name") end |
#resource_path ⇒ Object
9 10 11 |
# File 'app/events/decidim/trusted_ids/verifications/success_notification.rb', line 9 def resource_path Decidim::Verifications::Engine.routes.url_helpers.(handler: &.name) end |
#resource_title ⇒ Object
21 22 23 |
# File 'app/events/decidim/trusted_ids/verifications/success_notification.rb', line 21 def resource_title handler_name end |
#resource_url ⇒ Object
13 14 15 |
# File 'app/events/decidim/trusted_ids/verifications/success_notification.rb', line 13 def resource_url Decidim::Verifications::Engine.routes.url_helpers.(handler: &.name, host: organization.host) end |