回答編集履歴
1
a
test
CHANGED
@@ -18,9 +18,19 @@
|
|
18
18
|
|
19
19
|
エラーが出る場合,
|
20
20
|
|
21
|
-
comment.rbに
|
22
21
|
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
|
23
|
-
|
25
|
+
def index
|
26
|
+
|
27
|
+
favorite_messages_comment_ids=Comment.joins(message: :favorite).where(:favorites=>{:user_id=>current_user.id}).pluck(:id)
|
28
|
+
|
29
|
+
@activities = PublicActivity::Activity.order(created_at: :desc).where(activity_id: favorite_messages_comment_ids, activity_type: "Comment")
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
```
|
24
34
|
|
25
35
|
を追加してみてください
|
26
36
|
|