我正在使用 active_admin 和acts_As_taggable_on,并且正在尝试制作过滤器。这是模型代码:
class Person < ApplicationRecord
acts_as_taggable_on :expertise, :industry
end
这是过滤器:
filter :industry, as: :select, collection: Person.industry_counts.pluck(:name, :name)
这是我提交过滤器时遇到的错误:
SQLite3::SQLException: ambiguous column name: created_at: SELECT COUNT(DISTINCT "people"."id") FROM "people" LEFT OUTER JOIN "taggings" ON "taggings"."taggable_id" = "people"."id" AND "taggings"."context" = ? AND "taggings"."taggable_type" = ? WHERE "taggings"."tag_id" = 0 AND (created_at > '2017-01-17 00:22:53.923894')
我该如何解决?