Sha256: 3c7a8fa66184c72e66ea2b847aec35e01ba5d7a85686acec7204777e0a0cb3a0

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Blogs
    # This cell renders the List (:l) post card
    # for a given instance of a Post
    class PostLCell < Decidim::CardLCell
      delegate :photo, to: :model

      private

      def has_description?
        true
      end

      def description_length
        500
      end

      def metadata_cell
        "decidim/blogs/post_metadata"
      end

      def resource_image_url
        return if photo.blank?

        photo.url
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-blogs-0.29.1 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.4 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.29.0 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.3 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.29.0.rc4 app/cells/decidim/blogs/post_l_cell.rb