Class: Decidim::Initiatives::InitiativesStatsFollowersCount
- Inherits:
-
StatsFollowersCount
- Object
- Query
- StatsFollowersCount
- Decidim::Initiatives::InitiativesStatsFollowersCount
- Defined in:
- decidim-initiatives/app/queries/decidim/initiatives/initiatives_stats_followers_count.rb
Overview
This class counts all Followers of a initiative
Class Method Summary collapse
Methods inherited from StatsFollowersCount
Methods inherited from Query
#cached_query, #each, #eager?, #exists?, #initialize, merge, #none?, #query, #relation?, #|
Constructor Details
This class inherits a constructor from Decidim::StatsFollowersCount
Class Method Details
.for(participatory_space) ⇒ Object
7 8 9 10 11 |
# File 'decidim-initiatives/app/queries/decidim/initiatives/initiatives_stats_followers_count.rb', line 7 def self.for(participatory_space) return 0 unless participatory_space.is_a?(Decidim::Initiatives) new(participatory_space).query end |