aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorBen Toews <mastahyeti@users.noreply.github.com>2016-01-04 12:23:55 -0700
committerBen Toews <mastahyeti@users.noreply.github.com>2016-01-04 12:26:38 -0700
commit3e98819e20bc113343d4d4c0df614865ad5a9d3a (patch)
treefa003a9cbbec97f7d1cdb9a87a2c065473ad2e4d /railties/lib
parente165f7fa6044926796c9d9a8bb9a81bc78431d4f (diff)
downloadrails-3e98819e20bc113343d4d4c0df614865ad5a9d3a.tar.gz
rails-3e98819e20bc113343d4d4c0df614865ad5a9d3a.tar.bz2
rails-3e98819e20bc113343d4d4c0df614865ad5a9d3a.zip
add option for per-form CSRF tokens
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/initializers/per_form_csrf_tokens.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/per_form_csrf_tokens.rb b/railties/lib/rails/generators/rails/app/templates/config/initializers/per_form_csrf_tokens.rb
new file mode 100644
index 0000000000..1f569dedfd
--- /dev/null
+++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/per_form_csrf_tokens.rb
@@ -0,0 +1,4 @@
+# Be sure to restart your server when you modify this file.
+
+# Enable per-form CSRF tokens.
+Rails.application.config.action_controller.per_form_csrf_tokens = true