Sha256: 94b2770d1f4dd47a0f2606f971d74d115d69666b9a49e248729e366d3c7bfd2c
Contents?: true
Size: 1.17 KB
Versions: 42
Compression:
Stored size: 1.17 KB
Contents
# frozen_string_literal: true module Decidim module Conferences module AdminLog # This class holds the logic to present a `Decidim::Conferences::Partner` # 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 # PartnerPresenter.new(action_log, view_helpers).present class PartnerPresenter < Decidim::Log::BasePresenter private def diff_fields_mapping { name: :string, partner_type: :string, link: :string, weight: :integer, logo: :string } end def i18n_labels_scope "activemodel.attributes.conferences.partner" end def action_string case action when "create", "delete", "update" "decidim.admin_log.conferences.partner.#{action}" else super end end def diff_actions super + %w(delete) end end end end end
Version data entries
42 entries across 42 versions & 1 rubygems