0

I'm using

gem 'acts_as_follower', github: 'tcocca/acts_as_follower', branch: 'master'

and I have 2 users, user1 is following user2. so, to check wheather user1 is following user2 I'm doing this u1 = User.find(1) u2 = User.find(2) u1.following?(u2) # should return true

when I run this in rails console it's giving Follow Count (4.1ms) SELECT COUNT(*) FROM "follows" WHERE "follows"."blocked" = ? AND "follows"."follower_id" = ? AND "follows"."follower_type" = ? AND "follows"."followable_id" = ? AND "follows"."followable_type" = ? [["blocked", 0], ["follower_id", 1], ["follower_type", "User"], ["followable_id", 2], ["followable_type", "User"]]

and in vs-code console it's giving

CACHE Follow Count (0.0ms) SELECT COUNT(*) FROM "follows" WHERE "follows"."blocked" = ? AND "follows"."follower_id" = ? AND "follows"."follower_type" = ? AND "follows"."followable_id" = ? AND "follows"."followable_type" = ? [["blocked", 0], ["follower_id", 1], ["follower_type", "ApplicationRecord"], ["followable_id", 2], ["followable_type", "ApplicationRecord"]]

any solution ?

0 Answers0