我有两个模型:Country
和Resort
。
Resort
具有类型为“point”的字段点。
模型Country
has_many
Resort
s。
当我得到国家度假村与kaminari(.page(params [:page])。每(20))
我有一个错误:
PG::UndefinedFunction: ERROR: could not identify an equality operator for type point
LINE 1: SELECT DISTINCT "resorts".* FROM "resorts" INNER JOIN "coun...
^
: SELECT DISTINCT "resorts".* FROM "resorts" INNER JOIN "country_resorts" ON "resorts"."id" = "country_resorts"."resort_id" WHERE "country_resorts"."country_id" = $1 AND "country_resorts"."what" = $2 LIMIT 20 OFFSET 0
PG::UndefinedFunction: ERROR: could not identify an equality operator for type point
LINE 1: SELECT DISTINCT "resorts".* FROM "resorts" INNER JOIN "coun...
如果我得到没有kaminari的度假村,我会得到正常的结果。
我如何解决这个问题?