class ApplicationController < ActionController::Base
before_action :authenticate
protect_from_forgery with: :exception,
if: -> { authenticate_method.web? }
end
class ChatsController < ActionController::Base
skip_before_action :authenticate
before_action :authenticate_for_chat, only: :create
protect_from_forgery with: :exception,
if: -> { authenticate_method.web? }
end