Sha256: 2de95ad87a9b02f7243d3d7020d5ce505a5c94197e10e00b370a4979e70ad06a
Contents?: true
Size: 605 Bytes
Versions: 22
Compression:
Stored size: 605 Bytes
Contents
# frozen_string_literal: true require "cell/partial" module Decidim # This cell renders the list of endorsers. # # Example: # # cell("decidim/endorsers_list", my_component) class EndorsersListCell < Decidim::ViewModel include ApplicationHelper def show return unless endorsers.any? render end private # Finds the correct author for each endorsement. # # Returns an Array of presented Users/UserGroups def endorsers @endorsers ||= model.endorsements.for_listing.map { |identity| present(identity.normalized_author) } end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.23.0 | app/cells/decidim/endorsers_list_cell.rb |
decidim-core-0.22.0 | app/cells/decidim/endorsers_list_cell.rb |