Sha256: c4890a4ccc7649499663020c383a0a53cae1df72a71b7539368089d6f4f02a29
Contents?: true
Size: 614 Bytes
Versions: 10
Compression:
Stored size: 614 Bytes
Contents
# frozen_string_literal: true module Decidim module Initiatives # This cell renders the Grid (:g) initiative card # for a given instance of an Initiative class InitiativeGCell < Decidim::CardGCell private def resource_path Decidim::Initiatives::Engine.routes.url_helpers.initiative_path(model) end def image @image ||= model.attachments.find(&:image?) end def resource_image_url return if image.blank? image.url end def metadata_cell "decidim/initiatives/initiative_metadata_g" end end end end
Version data entries
10 entries across 10 versions & 1 rubygems