Sha256: d1a17269b25ed8aecd9c01bb47191faaf592ab44f00fdb9efd82b3163d930b01
Contents?: true
Size: 906 Bytes
Versions: 75
Compression:
Stored size: 906 Bytes
Contents
# frozen_string_literal: true module Decidim module AdminLog # This class holds the logic to present a `Decidim::Area` # 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 # AreaPresenter.new(action_log, view_helpers).present class AreaPresenter < Decidim::Log::BasePresenter private def diff_fields_mapping { name: :i18n, area_type_id: :area_type } end def action_string case action when "create", "delete", "update" "decidim.admin_log.area.#{action}" else super end end def i18n_labels_scope "activemodel.attributes.area" end end end end
Version data entries
75 entries across 75 versions & 1 rubygems