feat(dossier): validate on change and revalidate on input
This commit is contained in:
parent
c93141d8bb
commit
869d83dda9
26 changed files with 194 additions and 146 deletions
|
@ -292,9 +292,8 @@ module Instructeurs
|
|||
if dossier.champs_private_all.any?(&:changed?)
|
||||
dossier.last_champ_private_updated_at = Time.zone.now
|
||||
end
|
||||
if !dossier.save(context: :annotations)
|
||||
flash.now.alert = dossier.errors.full_messages
|
||||
end
|
||||
|
||||
dossier.save(context: :champs_private_value)
|
||||
|
||||
respond_to do |format|
|
||||
format.turbo_stream do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue