Rails 5: form_for vs form_with
问题 Rails 5 has introduced new form helper method form_with . How does it differs with form_for and when is it more appropriate to use? 回答1: This is really in preparation for rails 5.1 where only form_with should be used. It's meant to serve as a replacement for the two methods form_for and form_tag . form_for and form_tag in Rails were very similar, both allowed you to create a form tag but the first one uses model’s attributes to build create or update form, while the second one simply creates