回答編集履歴
1
a
answer
CHANGED
@@ -8,8 +8,13 @@
|
|
8
8
|
end
|
9
9
|
```
|
10
10
|
エラーが出る場合,
|
11
|
+
|
12
|
+
```ruby
|
11
|
-
|
13
|
+
def index
|
14
|
+
favorite_messages_comment_ids=Comment.joins(message: :favorite).where(:favorites=>{:user_id=>current_user.id}).pluck(:id)
|
15
|
+
@activities = PublicActivity::Activity.order(created_at: :desc).where(activity_id: favorite_messages_comment_ids, activity_type: "Comment")
|
12
|
-
|
16
|
+
end
|
17
|
+
```
|
13
18
|
を追加してみてください
|
14
19
|
解説としては、お気に入りにしている記事のコメントを取得して
|
15
20
|
PublicActivity::Activityとmergeしています。
|