From 52a32051c40de3fad0abb328a4784311d9aa72ea Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 1 Dec 2022 17:57:23 +0100 Subject: [PATCH] feat(dossier): add dossier.champs_public_all --- app/models/dossier.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 805326ee9..fc30676df 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -81,6 +81,7 @@ class Dossier < ApplicationRecord has_many :champs has_many :champs_public, -> { root.public_ordered }, class_name: 'Champ', inverse_of: false, dependent: :destroy has_many :champs_private, -> { root.private_ordered }, class_name: 'Champ', inverse_of: false, dependent: :destroy + has_many :champs_public_all, -> { public_only }, class_name: 'Champ', inverse_of: false has_many :commentaires, inverse_of: :dossier, dependent: :destroy has_many :invites, dependent: :destroy has_many :follows, -> { active }, inverse_of: :dossier