class ActionController::RequestForgeryProtection::ProtectionMethods::NullSession

Parent:
Object

Public Class Methods

new(controller) Show source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 164
def initialize(controller)
  @controller = controller
end

Public Instance Methods

handle_unverified_request() Show source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 169
def handle_unverified_request
  request = @controller.request
  request.session = NullSessionHash.new(request)
  request.flash = nil
  request.session_options = { skip: true }
  request.cookie_jar = NullCookieJar.build(request, {})
end

This is the method that defines the application behavior when a request is found to be unverified.

© 2004–2019 David Heinemeier Hansson
Licensed under the MIT License.