Sha256: cd31c33b11cb24c3f28a6d6469676de9359a19ece89fbc1029a73d5f46766c14
Contents?: true
Size: 1002 Bytes
Versions: 18
Compression:
Stored size: 1002 Bytes
Contents
# frozen_string_literal: true module Decidim module Proposals module AdminLog # This class holds the logic to present a `Decidim::Proposals::ProposalNote` # for the `AdminLog` log. # # Usage should be automatic and you should not need to call this class # directly, but here is an example: # # action_log = Decidim::ActionLog.last # view_helpers # => this comes from the views # ProposalNotePresenter.new(action_log, view_helpers).present class ProposalNotePresenter < Decidim::Log::BasePresenter private def diff_fields_mapping { body: :string } end def action_string case action when "create" "decidim.proposals.admin_log.proposal_note.#{action}" else super end end def i18n_labels_scope "activemodel.attributes.proposal_note" end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems