close
Skip to content

Replace form_for with form_with#2825

Merged
nickcharlton merged 1 commit into
thoughtbot:mainfrom
goosys:feature/form_with
Apr 7, 2025
Merged

Replace form_for with form_with#2825
nickcharlton merged 1 commit into
thoughtbot:mainfrom
goosys:feature/form_with

Conversation

@goosys
Copy link
Copy Markdown
Contributor

@goosys goosys commented Apr 4, 2025

Since form_for has been deprecated in Rails 5.1, I replaced it with form_with.
The change required minimal adjustments thanks to good compatibility.

In the demo app, we need to set config.action_view.form_with_generates_ids = true to automatically generate id and for attributes.
However, this is already true by default in load_defaults from Rails 6.0 onward, so it shouldn’t cause problems in most applications.

@goosys goosys marked this pull request as ready for review April 4, 2025 12:46
@nickcharlton nickcharlton merged commit 2ce9f2f into thoughtbot:main Apr 7, 2025
@nickcharlton
Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants