Sha256: f6b3492c3fe8df9404f2bd44e68a00df66267f38ee9ffe6c3b56ec3f0acd578d

Contents?: true

Size: 388 Bytes

Versions: 9

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ContentBlocks
    class StatsCell < Decidim::ViewModel
      delegate :current_organization, to: :controller

      def show
        return unless current_organization.show_statistics?
        render
      end

      def stats
        @stats ||= HomeStatsPresenter.new(organization: current_organization)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
decidim-core-0.16.1 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.16.0 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.15.2 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.15.1 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.15.0 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.14.4 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.14.3 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.14.2 app/cells/decidim/content_blocks/stats_cell.rb
decidim-core-0.14.1 app/cells/decidim/content_blocks/stats_cell.rb