質問編集履歴
1
どのファイルのコードなのかを明記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
**favs.controller.rb**
|
2
|
+
|
3
|
+
```
|
2
4
|
|
3
5
|
class FavsController < ApplicationController
|
4
6
|
|
@@ -10,9 +12,9 @@
|
|
10
12
|
|
11
13
|
```
|
12
14
|
|
15
|
+
**show.html.haml**
|
13
16
|
|
14
|
-
|
15
|
-
```
|
17
|
+
```
|
16
18
|
|
17
19
|
.main-contents__show-main__product__optionArea__likeBtn
|
18
20
|
|
@@ -22,9 +24,9 @@
|
|
22
24
|
|
23
25
|
```
|
24
26
|
|
27
|
+
**model/fav.rb**
|
25
28
|
|
26
|
-
|
27
|
-
```
|
29
|
+
```
|
28
30
|
|
29
31
|
class Fav < ApplicationRecord
|
30
32
|
|
@@ -38,7 +40,9 @@
|
|
38
40
|
|
39
41
|
```
|
40
42
|
|
41
|
-
|
43
|
+
**routes.rb**
|
44
|
+
|
45
|
+
```
|
42
46
|
|
43
47
|
resources :favs, only: [:create, :destroy]
|
44
48
|
|