enviar le usuarie con el reporte de error para saber a quien contactar

This commit is contained in:
f 2020-08-10 20:41:26 -03:00
parent 8500f4929c
commit a55ff02ce7

View file

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