Sha256: 6ceea153a1f0c3cbec548c904ddc80015c9226d7f909188f525c1f7c51219b94
Contents?: true
Size: 550 Bytes
Versions: 15
Compression:
Stored size: 550 Bytes
Contents
# frozen_string_literal: true module Decidim # This cell is used to render the images panel of a resource inside # a tab of a show view # # The `model` must be a resource to get the images from and is expected to # respond to photos method # # Example: # # cell( # "decidim/images_panel", # meeting # ) class ImagesPanelCell < Decidim::ViewModel alias resource model def show return if photos.blank? render end def photos @photos ||= resource.try(:photos) end end end
Version data entries
15 entries across 15 versions & 1 rubygems