0

我有一个Meeting模型,其中包含存档数据和非存档数据。

当我运行时,Model.reindex只有非归档数据被索引。

我也想索引非归档数据,以便在使用searchsearchkick 方法时也能看到非归档数据。

对于存档,我使用了paranoiagem,存档的列名为cancelled_at.

4

1 回答 1

2
Model.with_deleted.reindex

由于偏执狂 gem default_scope 始终没有删除/存档的,因此只需使用偏执狂自述文件https://github.com/rubysherpas/paranoia#usage中记录的辅助范围

于 2018-08-29T08:49:22.590 回答