Sha256: 09c46b5470a8ac10a98cfe7eb0b2022c7756f205ea3a065416dc44faf8c88a1d

Contents?: true

Size: 804 Bytes

Versions: 13

Compression:

Stored size: 804 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module AdminLog
    # This class holds the logic to present a `Decidim::UserGroup`
    # for the `AdminLog` log.
    #
    # Usage should be automatic and you shouldn't need to call this class
    # directly, but here's an example:
    #
    #    action_log = Decidim::ActionLog.last
    #    view_helpers # => this comes from the views
    #    UserGroupPresenter.new(action_log, view_helpers).present
    class UserGroupPresenter < Decidim::Log::BasePresenter
      private

      def has_diff?
        false
      end

      def action_string
        case action
        when "verify", "verify_via_csv", "reject", "block", "unblock"
          "decidim.admin_log.user_group.#{action}"
        else
          super
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.8 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.7 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.6 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.26.10 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.26.9 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.5 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.26.8 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.4 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.3 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.26.7 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.26.5 app/presenters/decidim/admin_log/user_group_presenter.rb
decidim-core-0.27.2 app/presenters/decidim/admin_log/user_group_presenter.rb