Sha256: 1e5da77aa094f58a6aa42aeafb74fdcea50743d364df7099c30badeadc9877e9

Contents?: true

Size: 526 Bytes

Versions: 6

Compression:

Stored size: 526 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcessGroups
    module ContentBlocks
      class StatsCell < Decidim::ViewModel
        def stats
          @stats ||= Decidim::ParticipatoryProcesses::ParticipatoryProcessGroupStatsPresenter.new(participatory_process_group: participatory_process_group)
        end

        def participatory_process_group
          @participatory_process_group ||= Decidim::ParticipatoryProcessGroup.find(model.scoped_resource_id)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.24.3 app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb
decidim-participatory_processes-0.24.2 app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb
decidim-participatory_processes-0.24.1 app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb
decidim-participatory_processes-0.24.0 app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb
decidim-participatory_processes-0.24.0.rc2 app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb
decidim-participatory_processes-0.24.0.rc1 app/cells/decidim/participatory_process_groups/content_blocks/stats_cell.rb