Sha256: 804b308f5d706b0b9f4844af722a7aaeb6af77a58ae8aa36449507c794b5d7f7
Contents?: true
Size: 795 Bytes
Versions: 6
Compression:
Stored size: 795 Bytes
Contents
# frozen_string_literal: true require "cell/partial" module Decidim module EnhancedTextwork class AmendmentCell < Decidim::ViewModel include Cell::ViewModel::Partial include Decidim::SanitizeHelper include ParagraphCellsHelper def show render end private def emendation model.emendation end def emendation_author present(model.emendation.authors.first) end def emendation_excerpt truncate(decidim_sanitize(translated_attribute(model.emendation.body), strip_tags: true), length: 200) end def created_at I18n.l model.created_at, format: :long end def compare_emendation_path compare_paragraph_path(model.emendation) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems