chore: Suppress the unnecessary CSRF warning (#2606)

Suppress the unnecessary CSRF warning
This commit is contained in:
Sojan Jose 2021-07-14 18:40:24 +05:30 committed by GitHub
parent dfddf9cacc
commit a5bc81b304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 11 additions and 9 deletions

View file

@ -3,13 +3,12 @@ class ApplicationController < ActionController::Base
include Pundit
include SwitchLocale
protect_from_forgery with: :null_session
skip_before_action :verify_authenticity_token
before_action :set_current_user, unless: :devise_controller?
around_action :switch_locale
around_action :handle_with_exception, unless: :devise_controller?
# after_action :verify_authorized
rescue_from ActiveRecord::RecordInvalid, with: :render_record_invalid
private