我收到此错误:
SQL (31.1ms) INSERT INTO "read_marks" ("readable_id", "readable_type", "timestamp", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["readable_id", nil], ["readable_type", "PublicActivity::ORM::ActiveRecord::Activity"], ["timestamp", Mon, 04 Mar 2013 03:29:52 UTC +00:00], ["user_id", 2]]
PG::Error: ERROR: value too long for type character varying(20)
因为“可读类型”只包含 20 个字符,而我正在传递“PublicActivity::ORM::ActiveRecord::Activity”。
这与将 gem unread 与 public_activity 使用相同的问题(显然解决了问题但没有说明如何(参见他的底部更新))