Sha256: ed45862495bef901bbf1a52bc14a22cb80853671da56feb3ec8095c42e8f3773

Contents?: true

Size: 603 Bytes

Versions: 7

Compression:

Stored size: 603 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    module ContentBlocks
      module LandingPage
        class DescriptionCell < Decidim::ViewModel
          include Decidim::SanitizeHelper

          delegate :current_participatory_space, to: :controller

          private

          def introductory_image
            current_participatory_space.attached_uploader(:introductory_image)
          end

          def description_text
            decidim_sanitize_editor(translated_attribute(current_participatory_space.description))
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-elections-0.26.5 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb
decidim-elections-0.26.4 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb
decidim-elections-0.27.0 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb
decidim-elections-0.26.3 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb
decidim-elections-0.27.0.rc2 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb
decidim-elections-0.27.0.rc1 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb
decidim-elections-0.26.2 app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb