2017-06-21 16:14:41 +02:00
|
|
|
module ApplicationHelper
|
|
|
|
def flash_class(level)
|
|
|
|
case level
|
|
|
|
when "notice" then "alert-success"
|
|
|
|
when "alert" then "alert-danger"
|
|
|
|
end
|
|
|
|
end
|
2017-06-22 16:45:57 +02:00
|
|
|
|
|
|
|
def current_email
|
|
|
|
current_user.try(:email) ||
|
|
|
|
current_gestionnaire.try(:email) ||
|
|
|
|
current_administrateur.try(:email)
|
|
|
|
end
|
2017-06-21 16:14:41 +02:00
|
|
|
end
|