Sha256: eea48a30d4c0d72eb58361bef8687b86d7d8f64cd306741f4516099e942e1b57

Contents?: true

Size: 560 Bytes

Versions: 7

Compression:

Stored size: 560 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class ChangeNicknameEvent < Decidim::Events::SimpleEvent
    include Decidim::Events::NotificationEvent
    delegate :organization, to: :user, prefix: false
    delegate :url_helpers, to: "Decidim::Core::Engine.routes"

    i18n_attributes :link_to_account_settings

    def notification_title
      I18n.t("decidim.events.nickname_event.notification_body", **i18n_options).to_s.html_safe
    end

    def i18n_options
      {
        link_to_account_settings: url_helpers.account_path
      }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.28.4 app/events/decidim/change_nickname_event.rb
decidim-core-0.28.3 app/events/decidim/change_nickname_event.rb
decidim-core-0.28.2 app/events/decidim/change_nickname_event.rb
decidim-core-0.28.1 app/events/decidim/change_nickname_event.rb
decidim-core-0.28.0 app/events/decidim/change_nickname_event.rb
decidim-core-0.28.0.rc5 app/events/decidim/change_nickname_event.rb
decidim-core-0.28.0.rc4 app/events/decidim/change_nickname_event.rb