instructeurs can create and download archives
This commit is contained in:
parent
609a1aa45b
commit
8b2849408c
10 changed files with 229 additions and 0 deletions
|
@ -156,6 +156,20 @@ class Procedure < ApplicationRecord
|
|||
includes(:draft_revision, :published_revision, administrateurs: :user)
|
||||
}
|
||||
|
||||
scope :for_download, -> {
|
||||
includes(
|
||||
:groupe_instructeurs,
|
||||
dossiers: {
|
||||
champs: [
|
||||
piece_justificative_file_attachment: :blob,
|
||||
champs: [
|
||||
piece_justificative_file_attachment: :blob
|
||||
]
|
||||
]
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
||||
validates :description, presence: true, allow_blank: false, allow_nil: false
|
||||
validates :administrateurs, presence: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue