ruby on rails - Socialization gem - two issues -
since implementation trivial, know suggestion how use socialization gem show "posts" associated followed user. there wasn't coherent description in gem guide.
this tried
post.where(id: current_user.followers.pluck(:id))
throws error
wrong number of arguments (0 1..2)
also, suggested in guide show follower/followee count, there strange output.
count in view starts off -2
, counts upwards there.
migration
add_column :users, :followers_count, :integer, :default => 0
user model devise
thanks.
as can see in socialization calling method followers
wrong in current_user
check code mentioned inside it
all followers
celebrity.followers(user)
so can see current_user.followers.pluck(:id)
wrong correct it.
Comments
Post a Comment