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 5 years have passed since last update.

Ruby on Railsに関するメモ

Last updated at Posted at 2018-04-19

URIとActionの関係性

通信 Action 意味
get /todos index 一覧取得
get /todos/1 show 一件取得
get /todos/new new 作成画面取得
get /todos/edit edit 編集画面取得
post /todos create 作成
put(patch) /todos/1 update 更新
delete /todos/1 delete 削除

ブラウザでroutesを確認するURL

http://localhost:3000/rails/info/routes

link_toからcontrollerにパラメータを付与して送る方法

<%= link_to '完了', status_todo_path(todo, ***status: 1***), method: :patch %>
上記のstatus: 1の様に、個別idと一緒にぶち込む。

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?