Sha256: b036cdd7487e1300217076a6efa5c54283e9f751e736c72f47a3d47185f6f1c4
Contents?: true
Size: 788 Bytes
Versions: 12
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability # Helpers needed to render the navigation breadcrumbs in results. # module BreadcrumbHelper def stats_calculator @stats_calculator ||= ResultStatsCalculator.new(result) end def current_scope params[:filter][:with_scope] if params[:filter] end def progress_calculator(scope_id, category_id) Decidim::Accountability::ResultsCalculator.new(current_component, scope_id, category_id).progress end def category return if (category_id = params.dig(:filter, :with_category)).blank? @category ||= current_participatory_space.categories.find(category_id.is_a?(Array) ? category_id.first : category_id) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems