Sha256: 7c466fb863789bce5e7f48324883325aa771ee5bf0ded163b2e9ee1a93621e38
Contents?: true
Size: 1.21 KB
Versions: 38
Compression:
Stored size: 1.21 KB
Contents
# frozen_string_literal: true module Decidim module Votings module Census class Datum < ApplicationRecord include Decidim::RecordEncryptor encrypt_attribute :full_name, type: :string encrypt_attribute :full_address, type: :string encrypt_attribute :postal_code, type: :string encrypt_attribute :mobile_phone_number, type: :string encrypt_attribute :email, type: :string belongs_to :dataset, counter_cache: :data_count, foreign_key: "decidim_votings_census_dataset_id", class_name: "Decidim::Votings::Census::Dataset" belongs_to :ballot_style, optional: true, class_name: "Decidim::Votings::BallotStyle", foreign_key: :decidim_votings_ballot_style_id validates :full_name, :full_address, :postal_code, :hashed_in_person_data, :hashed_check_data, presence: true validates :hashed_in_person_data, uniqueness: { scope: :dataset } validates :hashed_check_data, uniqueness: { scope: :dataset } end end end end
Version data entries
38 entries across 38 versions & 1 rubygems