Sha256: be75c65476c6bee2f038b25f1bf4322c28f3d082eeff9880c03914ad5c780066

Contents?: true

Size: 883 Bytes

Versions: 24

Compression:

Stored size: 883 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    module Census
      module AdminLog
        # This class holds the logic to present a `Decidim::Votings::Census::Dataset`
        # 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
        #    DatasetPresenter.new(action_log, view_helpers).present
        class DatasetPresenter < Decidim::Log::BasePresenter
          private

          def action_string
            case action
            when "create", "delete", "update"
              "decidim.votings.admin_log.census.#{action}"
            else
              super
            end
          end
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
decidim-elections-0.27.9 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.8 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.7 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.6 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.10 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.9 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.5 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.8 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.4 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.3 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.7 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.5 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.2 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.1 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.4 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.0 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.3 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.0.rc2 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.27.0.rc1 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb
decidim-elections-0.26.2 app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb