Sha256: 2fa59c3aa32e9a46ab313258617dd28abcf6bfac059f977926b9338dc0c3e094
Contents?: true
Size: 677 Bytes
Versions: 8
Compression:
Stored size: 677 Bytes
Contents
# frozen_string_literal: true module Decidim module Sortitions module Admin module SortitionsHelper include Decidim::TranslationsHelper include Decidim::PaginateHelper # Converst a list of components into a list of selectable options def components_options(components) components.map do |f| [translated_attribute(f.name), f.id] end end def sortition_category(sortition) return translated_attribute sortition.category&.name if sortition.category I18n.t("sortitions.form.all_categories", scope: "decidim.sortitions.admin") end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems