aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application
diff options
context:
space:
mode:
authornpezza93 <npezza93@gmail.com>2017-06-13 10:54:35 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-11-25 11:55:02 -0500
commit260d6f112a0ffdbe03e6f5051504cb441c1e94cd (patch)
tree17ddb1bff53c590fe7b3d4b36e6c7aa6ccb4a2a3 /railties/lib/rails/application
parentf76ca450f5027a4fa578d939b35fe4f608f2423e (diff)
downloadrails-260d6f112a0ffdbe03e6f5051504cb441c1e94cd.tar.gz
rails-260d6f112a0ffdbe03e6f5051504cb441c1e94cd.tar.bz2
rails-260d6f112a0ffdbe03e6f5051504cb441c1e94cd.zip
Change `form_with` to generates ids by default
When `form_with` was introduced we disabled the automatic generation of ids that was enabled in `form_for`. This usually is not an good idea since labels don't work when the input doesn't have an id and it made harder to test with Capybara. You can still disable the automatic generation of ids setting `config.action_view.form_with_generates_ids` to `false.`
Diffstat (limited to 'railties/lib/rails/application')
-rw-r--r--railties/lib/rails/application/configuration.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index 290ec13878..7f23203e8b 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -81,6 +81,7 @@ module Rails
if respond_to?(:action_view)
action_view.form_with_generates_remote_forms = true
+ action_view.form_with_generates_ids = true
end
when "5.2"