Fix calculating tsvector on hidden records
We introduced this bug in commit 55d339572, since we didn't take hidden
records into consideration.
I've tried to use `update_column` to simplify the code, but got a syntax
error `unnamed portal parameter` and didn't find how to fix it.
This commit is contained in:
@@ -6,7 +6,7 @@ module SearchCache
|
||||
end
|
||||
|
||||
def calculate_tsvector
|
||||
self.class.where(id: id).update_all("tsv = (#{searchable_values_sql})")
|
||||
self.class.with_hidden.where(id: id).update_all("tsv = (#{searchable_values_sql})")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user