instance method
protection_method_class
Ruby on Rails 4.0.13
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 96
def protection_method_class(name)
ActionController::RequestForgeryProtection::ProtectionMethods.const_get(name.to_s.classify)
rescue NameError
raise ArgumentError, 'Invalid request forgery protection method, use :null_session, :exception, or :reset_session'
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 96
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection::ClassMethods