Sha256: 530dd45f65b3a4c63a0be8b429b6e78c2943e1fe0f6d2f4a6d0c36d8d5616a41
Contents?: true
Size: 1010 Bytes
Versions: 12
Compression:
Stored size: 1010 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability module AdminLog # This class holds the logic to present a `Decidim::Accountability::TimelineEntry` # 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 # TimelineEntryPresenter.new(action_log, view_helpers).present class TimelineEntryPresenter < Decidim::Log::BasePresenter private def action_string case action when "create", "delete", "update" "decidim.accountability.admin_log.timeline_entry.#{action}" else super end end def diff_fields_mapping { entry_date: :date, description: :i18n, title: :i18n } end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems