instance method
protection_method_class
Ruby on Rails 8.0.4
Since v4.0.13 PrivateSignature
protection_method_class(name)
No documentation comment.
Parameters
-
namereq
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 221
def protection_method_class(name)
case name
when :null_session
ProtectionMethods::NullSession
when :reset_session
ProtectionMethods::ResetSession
when :exception
ProtectionMethods::Exception
when Class
name
else
raise ArgumentError, "Invalid request forgery protection method, use :null_session, :exception, :reset_session, or a custom forgery protection class."
end
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 221
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection::ClassMethods