diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-11-27 11:52:39 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-11-27 11:52:39 -0500 |
commit | 21cd5b3031b0c022439a88cb750c1e00cd07f1e3 (patch) | |
tree | 044010f8f0cdda3841988777ca2fee2d90209b7f /actionview/test/template/form_helper/form_with_test.rb | |
parent | a64be3ea6fae0d5e75cd987d725f71e91571c5cb (diff) | |
download | rails-21cd5b3031b0c022439a88cb750c1e00cd07f1e3.tar.gz rails-21cd5b3031b0c022439a88cb750c1e00cd07f1e3.tar.bz2 rails-21cd5b3031b0c022439a88cb750c1e00cd07f1e3.zip |
Make form_with_generates_ids default value to be false
This will keep the behavior of an application with the defaults of a 4.2
or 5.0 application behaving the same when upgrading to 5.2.
Diffstat (limited to 'actionview/test/template/form_helper/form_with_test.rb')
-rw-r--r-- | actionview/test/template/form_helper/form_with_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb index 4e268eaa16..0295ff627d 100644 --- a/actionview/test/template/form_helper/form_with_test.rb +++ b/actionview/test/template/form_helper/form_with_test.rb @@ -5,6 +5,15 @@ require "controller/fake_models" class FormWithTest < ActionView::TestCase include RenderERBUtils + + setup do + @old_value = ActionView::Helpers::FormHelper.form_with_generates_ids + ActionView::Helpers::FormHelper.form_with_generates_ids = true + end + + teardown do + ActionView::Helpers::FormHelper.form_with_generates_ids = @old_value + end end class FormWithActsLikeFormTagTest < FormWithTest |