Sha256: 16080a24987c4a3612ed5c09b9242abf030468c1af08dc0a8b311f3dbf7ef72d

Contents?: true

Size: 600 Bytes

Versions: 24

Compression:

Stored size: 600 Bytes

Contents

# frozen-string_literal: true

module Decidim
  class PromotedToAdminEvent < Decidim::Events::SimpleEvent
    delegate :url_helpers, to: "Decidim::Core::Engine.routes"

    i18n_attributes :user_group_name

    def resource_url
      url_helpers.group_manage_users_url(
        user_group_nickname,
        host: user.organization.host
      )
    end

    def resource_path
      url_helpers.group_manage_users_path(user_group_nickname)
    end

    def user_group_nickname
      extra.dig("user_group_nickname")
    end

    def user_group_name
      extra.dig("user_group_name")
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
decidim-core-0.23.6 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.5 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.4 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.3 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.2 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.1.rc1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.23.0 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.22.0 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.21.0 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.20.1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.20.0 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.19.1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.18.1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.19.0 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.17.2 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.18.0 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.17.1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.16.1 app/events/decidim/promoted_to_admin_event.rb
decidim-core-0.17.0 app/events/decidim/promoted_to_admin_event.rb