5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:51:43 +00:00

cerrar la sesión en lugar de dar un error

closes #290
closes #261
closes #232
closes #237
closes #238
closes #239
This commit is contained in:
f 2021-03-13 20:43:03 -03:00
parent f73e6ecb6f
commit a25ddb004a

View file

@ -4,7 +4,7 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
include ExceptionHandler include ExceptionHandler
protect_from_forgery with: :exception, prepend: true protect_from_forgery with: forgery_method, prepend: true
before_action :prepare_exception_notifier before_action :prepare_exception_notifier
before_action :configure_permitted_parameters, if: :devise_controller? before_action :configure_permitted_parameters, if: :devise_controller?
@ -54,6 +54,10 @@ class ApplicationController < ActionController::Base
render 'application/page_not_found', status: :not_found render 'application/page_not_found', status: :not_found
end end
def forgery_method
Rails.env.production? ? :null_session : :exception
end
protected protected
def configure_permitted_parameters def configure_permitted_parameters