优化: followers_by_type 返回 ActiveRecord_Relation 对象

This commit is contained in:
Forrest Ye 2018-04-14 20:43:17 +08:00
parent 71e32b5b4e
commit 3111b1406b
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ module ActsAsFollowable
'followable_type' => class_name(self),
'follower_type' => follower_type.name
).pluck('follower_id')
return follower_type.find(ids)
return follower_type.where("id in (?)", ids)
end
end
end