Class: ActionController::RequestForgeryProtection::ProtectionMethods::NullSession
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Inherits: | Object |
Defined in: | actionpack/lib/action_controller/metal/request_forgery_protection.rb |
Class Method Summary
- .new(controller) ⇒ NullSession constructor
Instance Method Summary
-
#handle_unverified_request
This is the method that defines the application behavior when a request is found to be unverified.
Constructor Details
.new(controller) ⇒ NullSession
# File 'actionpack/lib/action_controller/metal/request_forgery_protection.rb', line 253
def initialize(controller) @controller = controller end
Instance Method Details
#handle_unverified_request
This is the method that defines the application behavior when a request is found to be unverified.
# File 'actionpack/lib/action_controller/metal/request_forgery_protection.rb', line 259
def handle_unverified_request request = @controller.request request.session = NullSessionHash.new(request) request.flash = nil request. = { skip: true } request. = NullCookieJar.build(request, {}) end