Commit 659965df631d8b46c6a27efdc60f43c7cbdae8c0
1 parent
04000e0c
Exists in
master
and in
19 other branches
Updated readme [skip ci]
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
README.md
... | ... | @@ -1185,7 +1185,7 @@ class ReindexConversions |
1185 | 1185 | def self.perform(model) |
1186 | 1186 | class_name = model.name |
1187 | 1187 | recently_converted_ids = |
1188 | - Searchjoy::Search.where("convertable_type = ? AND converted_at > ?", class_name, 1.days.ago) | |
1188 | + Searchjoy::Search.where("convertable_type = ? AND converted_at > ?", class_name, 1.day.ago) | |
1189 | 1189 | .pluck(:convertable_id).sort |
1190 | 1190 | |
1191 | 1191 | recently_converted_ids.in_groups_of(1000, false) do |ids| |
... | ... | @@ -1205,7 +1205,7 @@ class ReindexConversions |
1205 | 1205 | end |
1206 | 1206 | |
1207 | 1207 | # partial reindex |
1208 | - class_name.constantize.where(id: ids).reindex(:search_conversions) | |
1208 | + model.where(id: ids).reindex(:search_conversions) | |
1209 | 1209 | end |
1210 | 1210 | end |
1211 | 1211 | end | ... | ... |