Sha256: 8d6b614a5841b0966f40cf8cedb204c7556b16ddfcb8c36621b5d62d5836feb1
Contents?: true
Size: 504 Bytes
Versions: 25
Compression:
Stored size: 504 Bytes
Contents
# frozen_string_literal: true module Decidim module Elections # Custom helpers for the voting booth views. # module VotesHelper def ordered_answers(question) if question.random_answers_order question.answers.shuffle else question.answers.sort_by { |answer| [answer.weight, answer.id] } end end def more_information?(answer) answer.description || answer.proposals.any? || answer.photos.any? end end end end
Version data entries
25 entries across 25 versions & 1 rubygems