[UPDATE] where(id: ids)返回 relations对象 find(ids)返回 Array对象

This commit is contained in:
ZengTao 2017-06-29 14:43:49 +08:00
parent d15311cd42
commit 3cdc39edce
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ module ActsAsFollowable
end
def followings(followable_type)
return followable_type.constantize.find(self.follows.where(followable_type: followable_type).pluck(:followable_id))
return followable_type.constantize.where(id: self.follows.where(followable_type: followable_type).pluck(:followable_id))
end
private