Fix dossier link

This commit is contained in:
Paul Chavard 2018-09-19 17:03:00 +02:00 committed by gregoirenovel
parent 591e6f25c3
commit 905a715e16
2 changed files with 3 additions and 3 deletions

View file

@ -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'

View file

@ -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