Module: Decidim::Elections::ApplicationHelper

Includes:
CheckBoxesTreeHelper
Defined in:
app/helpers/decidim/elections/application_helper.rb

Overview

Custom helpers, scoped to the elections engine.

Instance Method Summary collapse

Instance Method Details

#state_filter_valuesObject



10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/decidim/elections/application_helper.rb', line 10

def state_filter_values
  TreeNode.new(
    TreePoint.new("", t("elections.elections.filters.all", scope: "decidim")),
    [
      TreePoint.new("active", t("elections.elections.filters.active", scope: "decidim")),
      TreePoint.new("upcoming", t("elections.elections.filters.upcoming", scope: "decidim")),
      TreePoint.new("finished", t("elections.elections.filters.finished", scope: "decidim"))
    ]
  )
end