Sha256: 710451ea06cdcde2d43ce179bcc69763a86d7a5ed5617091ce74734e320ddf43
Contents?: true
Size: 991 Bytes
Versions: 11
Compression:
Stored size: 991 Bytes
Contents
# frozen_string_literal: true module Decidim module InitiativesVotes class VoteCell < Decidim::ViewModel delegate :timestamp, :hash_id, to: :model def show render end def initiative_id model.initiative.reference end def initiative_title translated_attribute(model.initiative.title) end def name_and_surname metadata[:name_and_surname] end def document_number metadata[:document_number] end def date_of_birth metadata[:date_of_birth] end def postal_code metadata[:postal_code] end def time_and_date model.created_at end protected def encryptor @encryptor ||= Decidim::Initiatives::DataEncryptor.new(secret: "personal user metadata") end def metadata @metadata ||= model.encrypted_metadata ? encryptor.decrypt(model.encrypted_metadata) : {} end end end end
Version data entries
11 entries across 11 versions & 1 rubygems