[UPDATE] where(id: ids)返回 relations对象 find(ids)返回 Array对象
This commit is contained in:
parent
d15311cd42
commit
3cdc39edce
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue