1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

form_withを調べました

Last updated at Posted at 2021-04-20

1.保存するしない

保村しない

view/a.html.erb
<%= form_with url: "パス" do |form| %>
  # 内容
<% end %>

保存する

view/a.html.erb
<%= form_with model: モデルクラスのインスタンス do |form| %>
  # 内容
<% end %>

参考:【Rails】form_withの使い方を徹底解説!「Pikawaka」
https://pikawaka.com/rails/form_with

参考:さらに詳しいいページ発見
MVCの観点から解説です。
@sew_sou19さんありがとうございます
https://qiita.com/sew_sou19/items/e9944904b50899fbb4cf

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?