instance method
form_authenticity_token
Ruby on Rails 4.1.16
Since v2.2.3Signature
form_authenticity_token()
Sets the token value for the current session.
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 249
def form_authenticity_token
session[:_csrf_token] ||= SecureRandom.base64(32)
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 249
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection