优化: followers_by_type 返回 ActiveRecord_Relation 对象
This commit is contained in:
parent
71e32b5b4e
commit
3111b1406b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue