Module ActionView::Helpers::CsrfHelper
In: vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb

Methods

Public Instance methods

Returns a meta tag with the cross-site request forgery protection token for forms to use. Place this in your head.

[Source]

    # File vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb, line 7
 7:       def csrf_meta_tag
 8:         if protect_against_forgery?
 9:           %(<meta name="csrf-param" content="#{h(request_forgery_protection_token)}"/>\n<meta name="csrf-token" content="#{h(form_authenticity_token)}"/>).html_safe
10:         end
11:       end

[Validate]