Fix dossier link
This commit is contained in:
parent
591e6f25c3
commit
905a715e16
2 changed files with 3 additions and 3 deletions
|
@ -90,8 +90,6 @@ class ApplicationController < ActionController::Base
|
|||
logged_users.first
|
||||
end
|
||||
|
||||
helper_method :logged_user
|
||||
|
||||
def logged_user_roles
|
||||
roles = logged_users.map { |logged_user| logged_user.class.name }
|
||||
roles.any? ? roles.join(', ') : 'Guest'
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
- if id.present?
|
||||
- dossier = logged_user.dossiers.find_by(id: id)
|
||||
- dossier = current_user&.dossiers&.find_by(id: id)
|
||||
- dossier ||= current_gestionnaire&.dossiers&.find_by(id: id)
|
||||
- dossier ||= current_administrateur&.dossiers&.find_by(id: id)
|
||||
- if dossier.blank?
|
||||
%p.text-warning
|
||||
Ce dossier est inconnu
|
||||
|
|
Loading…
Reference in a new issue