0
0

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.

記事を投稿する

Posted at

備忘録的に使用しています。
間違い等々あればご指摘ください!

1.コントローラーで定義
 newとcreateの定義
 newは新規作成するだけ、定義なし 
 createは「どんな内容」を投稿するか
  テーブル名.create(引数) 

2.投稿フォームのviewの作成
 new.html.erb : 投稿するときに出る画面
  ・フォームタグで作成
  form_tag ('/テーブル名' method: :post) do

 create.html.erb :投稿後に切り替わった画面

  

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?