Sha256: 47b7f33753c1b0d2764df826260ce2a50f464ceaff8ea3631e3c372f66bfc8f0
Contents?: true
Size: 778 Bytes
Versions: 8
Compression:
Stored size: 778 Bytes
Contents
# frozen_string_literal: true module Decidim module Accountability # The data store for a Status in the Decidim::Accountability component. It stores a # key, a localized name, a localized description and and associated progress number. class Status < Accountability::ApplicationRecord include Decidim::HasComponent include Decidim::TranslatableResource component_manifest_name "accountability" translatable_fields :name, :description has_many :results, foreign_key: "decidim_accountability_status_id", class_name: "Decidim::Accountability::Result", inverse_of: :status, dependent: :nullify validates :key, presence: true, uniqueness: { scope: :decidim_component_id } validates :name, presence: true end end end
Version data entries
8 entries across 8 versions & 1 rubygems