From a55ff02ce7c25c0bde33701964650ed35768b831 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 10 Aug 2020 20:41:26 -0300 Subject: [PATCH] enviar le usuarie con el reporte de error para saber a quien contactar --- app/controllers/application_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 17dc49a..a5df344 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,8 @@ class ApplicationController < ActionController::Base include ExceptionHandler protect_from_forgery with: :exception + + before_action :prepare_exception_notifier before_action :configure_permitted_parameters, if: :devise_controller? around_action :set_locale @@ -52,4 +54,8 @@ class ApplicationController < ActionController::Base def configure_permitted_parameters devise_parameter_sanitizer.permit(:account_update, keys: %i[lang]) end + + def prepare_exception_notifier + request.env['exception_notifier.exception_data'] = { current_user: current_user } + end end