instance method
embed_authenticity_token?
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
embed_authenticity_token?()
Checks if the forms and csrf_meta_tags this controller renders carry an authenticity token. Under the :header_only verification strategy no request is checked against a token, so none is rendered unless a form asks for one with ‘authenticity_token: true`.
Source
# File actionpack/lib/action_controller/metal/request_forgery_protection.rb, line 876
def embed_authenticity_token? # :doc:
protect_against_forgery? && !using_header_only_for_forgery_protection?
end
Defined in actionpack/lib/action_controller/metal/request_forgery_protection.rb line 876
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::RequestForgeryProtection