module ActionView::Helpers::CsrfHelper

def csrf_meta_tag

for forms to use. Place this in your head.
Returns a meta tag with the cross-site request forgery protection token
def csrf_meta_tag
  if protect_against_forgery?
    %(<meta name="csrf-param" content="#{Rack::Utils.escape_html(request_forgery_protection_token)}"/>\n<meta name="csrf-token" content="#{Rack::Utils.escape_html(form_authenticity_token)}"/>).html_safe
  end
end