app/models/decidim/accountability/status.rb in decidim-accountability-0.7.4 vs app/models/decidim/accountability/status.rb in decidim-accountability-0.8.0
- old
+ new
@@ -7,10 +7,10 @@
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
+ 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_feature_id }
validates :name, presence: true
end
end