Sha256: 2fdfb93f5d8b452989869829575782b600e6f011d9f492b5d861c7e20867a453

Contents?: true

Size: 660 Bytes

Versions: 8

Compression:

Stored size: 660 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::HasFeature

      feature_manifest_name "accountability"

      has_many :results, foreign_key: "decidim_accountability_status_id", class_name: "Decidim::Accountability::Result", inverse_of: :status

      validates :key, presence: true, uniqueness: { scope: :decidim_feature_id }
      validates :name, presence: true
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-accountability-0.7.4 app/models/decidim/accountability/status.rb
decidim-accountability-0.7.3 app/models/decidim/accountability/status.rb
decidim-accountability-0.7.2 app/models/decidim/accountability/status.rb
decidim-accountability-0.7.1 app/models/decidim/accountability/status.rb
decidim-accountability-0.7.0 app/models/decidim/accountability/status.rb
decidim-accountability-0.1.2 app/models/decidim/accountability/status.rb
decidim-accountability-0.1.1 app/models/decidim/accountability/status.rb
decidim-accountability-0.1.0 app/models/decidim/accountability/status.rb