feat(dossier): add dossier.champs_public_all

This commit is contained in:
Paul Chavard 2022-12-01 17:57:23 +01:00
parent 16a48c02aa
commit 52a32051c4

View file

@ -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