0
activeadminを使用しています。私は人のためにactiveadminのページを作ろうとしています。人belongs_to :team
とチームhas_many :people
。 sqliteのと開発では、次のコードは完璧に動作します:activeadmin sortableはsqliteでは動作しますがpostgresでは動作しません
ActiveAdmin.register Person, as: "vc" do
index do
column :team, sortable: :team
end
def scoped_collection
p = Person.with_any_role(*Person.value_consumer_role_names).collect(&:id)
Person.includes(:team).where(id: p)
end
end
しかし、HerokuのとPostgreSQLを使用して生産で、私は次のエラーを取得する:
ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column "team" does not exist
が、私はこれをどのように修正すればよいですか?
列線で