回答編集履歴

1

追記

2020/09/12 09:36

投稿

winterboum
winterboum

スコア23351

test CHANGED
@@ -1 +1,21 @@
1
1
  リダイレクトさせなくても、
2
+
3
+ ```
4
+
5
+ session.delete(:how_to_pay)
6
+
7
+ CartItem.where(cart_id: current_cart).delete_all
8
+
9
+ redirect_to root_path
10
+
11
+ else
12
+
13
+ render "index"
14
+
15
+ end
16
+
17
+ end
18
+
19
+ ```
20
+
21
+ で良いのでは?