Add search method to legislation processes

This way we'll be able to search processes in the SDG Management
section.
This commit is contained in:
Javi Martín
2020-12-16 14:36:23 +01:00
parent 852014e478
commit 948a8b2904
6 changed files with 68 additions and 2 deletions

View File

@@ -11,8 +11,9 @@ namespace :db do
load(Rails.root.join("db", "sdg.rb"))
end
desc "Calculates the TSV column for all polls"
desc "Calculates the TSV column for all polls and legislation processes"
task calculate_tsv: :environment do
Poll.find_each(&:calculate_tsvector)
Legislation::Process.find_each(&:calculate_tsvector)
end
end