Sha256: 42015d786ea002a1383257fee990c543069686ef182879a84423c42d79f4cc16

Contents?: true

Size: 471 Bytes

Versions: 5

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Blogs
    # This cell renders the Grid (:g) post card
    # for a given instance of a Post
    class PostGCell < Decidim::CardGCell
      delegate :photo, to: :model

      private

      def show_description?
        true
      end

      def metadata_cell
        "decidim/blogs/post_metadata_g"
      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_g_cell.rb
decidim-blogs-0.28.4 app/cells/decidim/blogs/post_g_cell.rb
decidim-blogs-0.29.0 app/cells/decidim/blogs/post_g_cell.rb
decidim-blogs-0.28.3 app/cells/decidim/blogs/post_g_cell.rb
decidim-blogs-0.29.0.rc4 app/cells/decidim/blogs/post_g_cell.rb