[fix 363] Dossier: remove next_step! action = comment
This commit is contained in:
parent
4adbb09e9c
commit
629cccbf27
3 changed files with 1 additions and 115 deletions
|
@ -19,11 +19,9 @@ class CommentairesController < ApplicationController
|
|||
if is_gestionnaire?
|
||||
@commentaire.email = current_gestionnaire.email
|
||||
@commentaire.dossier = current_gestionnaire.dossiers.find_by(id: dossier_id) || current_gestionnaire.avis.find_by!(dossier_id: dossier_id).dossier
|
||||
@commentaire.dossier.next_step! 'gestionnaire', 'comment'
|
||||
else
|
||||
@commentaire.email = current_user.email
|
||||
@commentaire.dossier = current_user.dossiers.find_by(id: dossier_id) || current_user.invites.find_by!(dossier_id: dossier_id).dossier
|
||||
@commentaire.dossier.next_step! 'user', 'comment' if current_user.email == @commentaire.dossier.user.email
|
||||
end
|
||||
|
||||
@commentaire.file = params["file"]
|
||||
|
|
|
@ -145,7 +145,7 @@ class Dossier < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def next_step! role, action, motivation = nil
|
||||
unless %w(initiate follow update comment receive refuse without_continuation close).include?(action)
|
||||
unless %w(initiate follow update receive refuse without_continuation close).include?(action)
|
||||
fail 'action is not valid'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue