Sha256: 18a9f71915af39eaf44a52f1f879bccf1f5dd45ce780caad8e749a3e0db862e4

Contents?: true

Size: 629 Bytes

Versions: 46

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Debates
    module AdminLog
      module ValueTypes
        # This class presents the given value as a Decidim::Debates::DebateTitleBody. Check
        # the `DefaultPresenter` for more info on how value presenters work.
        class DebateTitleDescriptionPresenter < Decidim::Log::ValueTypes::DefaultPresenter
          def present
            return unless value

            renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.translated_attribute(value))
            renderer.render(links: false).html_safe
          end
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
decidim-debates-0.24.0.rc1 app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
decidim-debates-0.23.3 app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
decidim-debates-0.23.2 app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
decidim-debates-0.23.1 app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
decidim-debates-0.23.1.rc1 app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb
decidim-debates-0.23.0 app/presenters/decidim/debates/admin_log/value_types/debate_title_description_presenter.rb