我不确定这是否与邮箱宝石有关,或者这是否是更深层次的东西。每当我单击一个链接时,我的消息表、对话表和收据表中的所有记录都会被加载。即使页面与邮箱无关,也会发生这种情况。有谁知道这是为什么或我该如何解决?
例如,无论我去哪个页面,以下内容总是出现在我的服务器日志中:
Receipt Load (0.3ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 80]]
Receipt Load (0.3ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 80]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 78]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 78]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 75]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 75]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 69]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 69]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 67]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 67]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 66]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 66]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 65]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 65]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 63]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 63]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 60]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 60]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 55]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 55]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 51]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 51]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 46]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 46]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 45]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 45]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 44]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 44]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 42]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 42]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 41]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 41]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 39]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 39]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 38]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 38]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 37]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 37]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 43]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 43]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 32]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 32]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 31]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 31]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 29]]
Receipt Load (0.2ms) SELECT "receipts".* FROM "receipts" WHERE "receipts"."notification_id" = $1 AND (receiver_id = 32) ORDER BY "receipts"."id" ASC LIMIT 1 [["notification_id", 29]]
我正在使用活动记录、postgres 和 rails 4。