Sha256: 3b198472225d28c47a82e1ebca0d359b2882be5cca681ecc97b440275dc0a30f

Contents?: true

Size: 444 Bytes

Versions: 7

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    module ContentBlocks
      class StatisticsCell < Decidim::ContentBlocks::ParticipatorySpaceStatsCell
        private

        def stats
          @stats ||= begin
            voting = Decidim::Votings::Voting.find_by(id: model.scoped_resource_id)
            Decidim::Votings::VotingStatsPresenter.new(voting:).collection
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/cells/decidim/votings/content_blocks/statistics_cell.rb
decidim-elections-0.28.3 app/cells/decidim/votings/content_blocks/statistics_cell.rb
decidim-elections-0.28.2 app/cells/decidim/votings/content_blocks/statistics_cell.rb
decidim-elections-0.28.1 app/cells/decidim/votings/content_blocks/statistics_cell.rb
decidim-elections-0.28.0 app/cells/decidim/votings/content_blocks/statistics_cell.rb
decidim-elections-0.28.0.rc5 app/cells/decidim/votings/content_blocks/statistics_cell.rb
decidim-elections-0.28.0.rc4 app/cells/decidim/votings/content_blocks/statistics_cell.rb