##【merit】 ■ Understanding of form ■ Understanding of association
##【Development environment】 ■ Mac OS catalina ■ Ruby on Rails (184.108.40.206) ■ Virtual Box:6.1 ■ Vagrant: 2.2.7
In the curriculum
Until now, form_for(@post)….
One argument, but why two? ? ?
The reason is that you have to pass two arguments.
In this case, it is association
Post: comment = 1 :many
Therefore, it is necessary to give a value to both post and comment…
Become ####form_for[@post, @comment]!!!!
that’s all, If you have any corrections, please FB! !!
[I want to read it together]
■ About comment function implementation https://qiita.com/tanaka-yu3/items/93d94b1ede8fb4be2981
■ About form_with https://qiita.com/tanaka-yu3/items/50f54f5d4f4b8dfe19f3
■ Method list https://qiita.com/tanaka-yu3/items/89abad875187494bec53