Sha256: 7fb05ceccc7b82c8285514e6d090dd6883fb253866b124fe5f7454f288055c14
Contents?: true
Size: 633 Bytes
Versions: 49
Compression:
Stored size: 633 Bytes
Contents
# frozen_string_literal: true module Decidim module Consultations module Admin # Helper for questions controller module QuestionsHelper include Decidim::TranslationsHelper Option = Struct.new(:id, :title) def question_example_slug "question-#{Time.now.utc.year}-#{Time.now.utc.month}-1" end def question_response_groups(question = current_question) [Option.new("", "-")] + question.response_groups.map do |group| Option.new(group.id, translated_attribute(group.title)) end end end end end end
Version data entries
49 entries across 49 versions & 1 rubygems