Re-index existing articles with DataUpdateScript (#6109) [deploy]
This commit is contained in:
parent
2ae8d71241
commit
6356089ee0
2 changed files with 15 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
module DataUpdateScripts
|
||||
class ReIndexExistingArticlesWithApproved
|
||||
def run
|
||||
Article.published.find_each { |article| Article.trigger_index(article, false) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
require "rails_helper"
|
||||
require Rails.root.join("lib/data_update_scripts/20200217131245_re_index_existing_articles_with_approved.rb")
|
||||
|
||||
describe DataUpdateScripts::ReIndexExistingArticlesWithApproved do
|
||||
it "triggers a re-index on articles" do
|
||||
expect(Article).to respond_to(:trigger_index)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue