lib/decidim/accountability/feature.rb in decidim-accountability-0.8.4 vs lib/decidim/accountability/feature.rb in decidim-accountability-0.9.0
- old
+ new
@@ -24,9 +24,13 @@
settings.attribute :subcategories_label, type: :string, translated: true, editor: true
settings.attribute :heading_parent_level_results, type: :string, translated: true, editor: true
settings.attribute :heading_leaf_level_results, type: :string, translated: true, editor: true
end
+ feature.register_stat :results_count, primary: true, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |features, _start_at, _end_at|
+ Decidim::Accountability::Result.where(feature: features).count
+ end
+
feature.settings(:step) do |settings|
settings.attribute :comments_blocked, type: :boolean, default: false
end
feature.exports :results do |exports|