Sha256: c971f8c1939f95b700d2f79755f72d376717a6bd0abda4eaf81921774eb907c7
Contents?: true
Size: 555 Bytes
Versions: 28
Compression:
Stored size: 555 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) translated_attribute(answer.description).present? || answer.proposals.any? || answer.photos.any? end end end end
Version data entries
28 entries across 28 versions & 1 rubygems