Sha256: 27d79a6f61d8ddd889ef0c827215b11a6b8af574ef6e3255ab78fd39be020181

Contents?: true

Size: 483 Bytes

Versions: 18

Compression:

Stored size: 483 Bytes

Contents

module ActionView
  # = Action View CSRF Helper
  module Helpers
    module CsrfHelper
      # Returns a meta tag with the cross-site request forgery protection token
      # for forms to use. Place this in your head.
      def csrf_meta_tag
        if protect_against_forgery?
          %(<meta name="csrf-param" content="#{h(request_forgery_protection_token)}"/>\n<meta name="csrf-token" content="#{h(form_authenticity_token)}"/>).html_safe
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 7 rubygems

Version Path
actionpack-2.3.18 lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.17-rack-upgrade-2.3.17 lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.17 lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.16 lib/action_view/helpers/csrf_helper.rb
actionpack-rack-upgrade-2-2.3.16 lib/action_view/helpers/csrf_helper.rb
actionpack-rack-upgrade-2-2.3.15 lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.15 lib/action_view/helpers/csrf_helper.rb
actionpack-rack-upgrade-2.3.16 lib/action_view/helpers/csrf_helper.rb
actionpack-rack-upgrade-2.3.15 lib/action_view/helpers/csrf_helper.rb
actionpack-rack-upgrade-2.3.14 lib/action_view/helpers/csrf_helper.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/actionpack-2.3.14/lib/action_view/helpers/csrf_helper.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/actionpack-2.3.12/lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.14 lib/action_view/helpers/csrf_helper.rb
kajam-1.0.3.rc2 vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.12 lib/action_view/helpers/csrf_helper.rb
radiant-1.0.0.rc2 vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb
radiant-1.0.0.rc1 vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb
actionpack-2.3.11 lib/action_view/helpers/csrf_helper.rb