revoke expert avis
This commit is contained in:
parent
4ff8be4b46
commit
3ea34834a7
8 changed files with 95 additions and 6 deletions
|
@ -56,6 +56,18 @@ class Avis < ApplicationRecord
|
|||
dossier.procedure
|
||||
end
|
||||
|
||||
def revoked?
|
||||
revoked_at.present?
|
||||
end
|
||||
|
||||
def revoke!
|
||||
if answer.present?
|
||||
update!(revoked_at: Time.zone.now)
|
||||
else
|
||||
destroy!
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def try_to_assign_instructeur
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue