回答編集履歴

2

追記

2020/04/26 13:23

投稿

winterboum
winterboum

スコア23349

test CHANGED
@@ -9,3 +9,11 @@
9
9
  <%= link_to("削除", "/posts/#{@post.id}", {method: "delete"}) %>`
10
10
 
11
11
  にしてみてください
12
+
13
+
14
+
15
+ ###
16
+
17
+ 全く同じ質問を繰り返してますね。。。。
18
+
19
+ しかも私と同じ回答だ。。。。

1

修正

2020/04/26 13:23

投稿

winterboum
winterboum

スコア23349

test CHANGED
@@ -1,7 +1,11 @@
1
+ `post "posts/:id/destroy" => "posts#destroy"
2
+
1
- `<%= link_to("削除", "/posts/#{@post.id}/destroy", {method: "post"}) %>`
3
+ <%= link_to("削除", "/posts/#{@post.id}/destroy", {method: "post"}) %>`
2
4
 
3
5
 
4
6
 
5
- `<%= link_to("削除", "/posts/#{@post.id}", {method: "delete"}) %>`
7
+ `delete "posts/:id" => "posts#destroy"
6
8
 
9
+ <%= link_to("削除", "/posts/#{@post.id}", {method: "delete"}) %>`
10
+
7
-
11
+ してみてください