mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:21:41 +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:
parent
f73e6ecb6f
commit
a25ddb004a
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
include ExceptionHandler
|
||||
|
||||
protect_from_forgery with: :exception, prepend: true
|
||||
protect_from_forgery with: forgery_method, prepend: true
|
||||
|
||||
before_action :prepare_exception_notifier
|
||||
before_action :configure_permitted_parameters, if: :devise_controller?
|
||||
|
@ -54,6 +54,10 @@ class ApplicationController < ActionController::Base
|
|||
render 'application/page_not_found', status: :not_found
|
||||
end
|
||||
|
||||
def forgery_method
|
||||
Rails.env.production? ? :null_session : :exception
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def configure_permitted_parameters
|
||||
|
|
Loading…
Reference in a new issue