回答編集履歴

2

修正

2019/08/29 09:01

投稿

rhiroe
rhiroe

スコア2349

test CHANGED
@@ -1,7 +1,11 @@
1
1
  ```erb
2
2
 
3
+ <%= link_to completed_task_path(task) do %>
4
+
3
- <%= button_to "完了", completed_task_path(task), type: 'button' %>
5
+ <%= button_tag '完了', type: 'button' %>
6
+
7
+ <% end %>
4
8
 
5
9
  ```
6
10
 
7
- としてください
11
+ としてください

1

修正

2019/08/29 09:01

投稿

rhiroe
rhiroe

スコア2349

test CHANGED
@@ -1,7 +1,7 @@
1
- `{"utf8"=>"✓", "_method"=>"patch", "authenticity_token"=>"J0Ys8GLxr0bg8+PTCa...}`
1
+ ```erb
2
2
 
3
- となっているのがパラメータの中身です。見たらわかる通り`:task`は存在していません。
3
+ <%= button_to "完了", completed_task_path(task), type: 'button' %>
4
4
 
5
+ ```
5
6
 
6
-
7
- `<form>`の内容を送信するには`<input type="submit">`の要素を使っ送信する必要があります。
7
+ としください