'follower_type and followable_type in acts_as_follower gem giving different output in rails console and vs-code terminal
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 ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
