質問編集履歴
4
テーブルの更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,9 +42,9 @@
|
|
42
42
|
|
43
43
|
Likesテーブル
|
44
44
|
|
45
|
-
|
45
|
+
t.references :user,foreignkey: true
|
46
46
|
|
47
|
-
t.
|
47
|
+
t.references :portfolio,foreignkey: true
|
48
48
|
|
49
49
|
|
50
50
|
|
3
更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
いいね
|
5
|
+
いいねしたportfolioを一覧表示したい
|
6
6
|
|
7
7
|
|
8
8
|
|
2
更新
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
いいねしたデータを一覧表示したい
|
test
CHANGED
File without changes
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
has_many :portfolios, dependent: :destroy
|
68
68
|
|
69
|
-
has_many :like_
|
69
|
+
has_many :like_portfolios, through: :likes, source: :portfolio
|
70
70
|
|
71
71
|
has_many :likes, dependent: :destroy
|
72
72
|
|