回答編集履歴
1
コードの修正
answer
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
to_jsonを使うことにしました。
|
2
2
|
|
3
3
|
```ruby
|
4
|
-
render json: user.to_json(include: { comments: :user })
|
4
|
+
render json: user.to_json(include: articles: { include: { comments: :user })
|
5
5
|
```
|