回答編集履歴
1
別解
test
CHANGED
@@ -1 +1,11 @@
|
|
1
1
|
`Content.where(id: @microposts.map(&:content_id))`
|
2
|
+
|
3
|
+
別解
|
4
|
+
|
5
|
+
```
|
6
|
+
|
7
|
+
@microposts = Micropost.includes(:content).where(user_id: params[:id])
|
8
|
+
|
9
|
+
@contets = @microposts.map(&:content)
|
10
|
+
|
11
|
+
```
|