aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/form_tag_helper.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-03-23 21:43:11 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2017-04-16 16:25:38 +0200
commit6309b85100dd2b55c716ee4a4e9cbd3da2dc0617 (patch)
treeb2f3e70f61439d334a947afe45080004bd1cea1a /actionview/lib/action_view/helpers/form_tag_helper.rb
parentc8a9ac000d72f8435eb1bc417bf8a001ec20cb6a (diff)
downloadrails-6309b85100dd2b55c716ee4a4e9cbd3da2dc0617.tar.gz
rails-6309b85100dd2b55c716ee4a4e9cbd3da2dc0617.tar.bz2
rails-6309b85100dd2b55c716ee4a4e9cbd3da2dc0617.zip
Default embed_authenticity_token_in_remote_forms to nil.
Effectively treat nil values as "auto", e.g. whatever a form helper chooses to interpret it as. But treat an explicitly assigned false value as disabling.
Diffstat (limited to 'actionview/lib/action_view/helpers/form_tag_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/form_tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb
index ffc64e7118..9fc08b3837 100644
--- a/actionview/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionview/lib/action_view/helpers/form_tag_helper.rb
@@ -18,7 +18,7 @@ module ActionView
include TextHelper
mattr_accessor :embed_authenticity_token_in_remote_forms
- self.embed_authenticity_token_in_remote_forms = false
+ self.embed_authenticity_token_in_remote_forms = nil
# Starts a form tag that points the action to a url configured with <tt>url_for_options</tt> just like
# ActionController::Base#url_for. The method for the form defaults to POST.