blob: 2d6af521807533c8dedc375a2a27a57a38edd338 (
plain) (
tree)
|
|
module ActionView
module Helpers
module CsrfHelper
# Returns a meta tag with the request forgery protection token for forms to use. Put this in your head.
def csrf_meta_tag
if protect_against_forgery?
%(<meta name="csrf-token" content="#{Rack::Utils.escape(form_authenticity_token)}"/>).html_safe
end
end
end
end
end
|