[#2604] Introduce errors when retrieving ProcedurePresentation
This commit is contained in:
parent
84cac7a5c2
commit
7baa239095
5 changed files with 21 additions and 9 deletions
|
@ -3,7 +3,7 @@ class AssignTo < ApplicationRecord
|
|||
belongs_to :gestionnaire
|
||||
has_one :procedure_presentation, dependent: :destroy
|
||||
|
||||
def procedure_presentation_or_default
|
||||
procedure_presentation || build_procedure_presentation
|
||||
def procedure_presentation_or_default_and_errors
|
||||
[procedure_presentation || build_procedure_presentation, nil]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue