1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Rafael Mendonça França 2017-11-27 11:52:39 -05:00
parent a64be3ea6f
commit 21cd5b3031
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
3 changed files with 10 additions and 5 deletions

View file

@ -478,7 +478,7 @@ module ActionView
mattr_accessor :form_with_generates_remote_forms, default: true
mattr_accessor :form_with_generates_ids, default: true
mattr_accessor :form_with_generates_ids, default: false
# Creates a form tag based on mixing URLs, scopes, or models.
#

View file

@ -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

View file

@ -73,10 +73,6 @@ module Rails
end
self.ssl_options = { hsts: { subdomains: true } }
if respond_to?(:action_view)
action_view.form_with_generates_ids = false
end
when "5.1"
load_defaults "5.0"