Ruby on Rails Tuesday, February 18, 2020

I don't think you can blame Rails 6 for that. It is a weird default, but it is like that from the very beginning.
I never use the method, so, I guess, it can be considered as somewhat obscure. It seems to appear in Rails version 5.1 and no change since.
Normally, I would use ActiveModel for a local form. Just in case you don't know, ActiveModel can also be used independently from ActiveRecord.

This is the earliest docs I found.
https://api.rubyonrails.org/v5.1/classes/ActionView/Helpers/FormHelper.html#method-i-form_with

Guess someone already complained, but it is too late; there is no good reason to introduces breaking changes for a better default.
Also, in a sense, this can be the better default, since ActiveModel is there for you to build a form for the same app.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3e340425-4707-456e-9f3c-4a1a6fa09bc8%40googlegroups.com.

No comments:

Post a Comment