Sha256: a45378461dce479674c96a64486d3a0212f3941b33b7998debba48ccf0a686b8

Contents?: true

Size: 827 Bytes

Versions: 24

Compression:

Stored size: 827 Bytes

Contents

# frozen_string_literal: true

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

        def action_string
          case action
          when "create", "delete", "update"
            "decidim.votings.admin_log.polling_station.#{action}"
          else
            super
          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/admin_log/polling_station_presenter.rb
decidim-elections-0.27.8 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.7 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.6 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.10 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.9 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.5 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.8 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.4 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.3 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.7 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.5 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.2 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.1 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.4 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.0 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.3 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.0.rc2 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.27.0.rc1 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb
decidim-elections-0.26.2 app/presenters/decidim/votings/admin_log/polling_station_presenter.rb