We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 615ade1 + 094f79a commit ca73670Copy full SHA for ca73670
app/routines/update_slugs.rb
@@ -4,7 +4,7 @@ class UpdateSlugs
4
protected
5
6
def exec
7
- Exercise.preload(:publication).in_batches(of: 100, load: true) do |exercises|
+ Exercise.chainable_latest.preload(:publication).in_batches(of: 100, load: true) do |exercises|
8
Exercise.transaction do
9
updated_exercise_ids = exercises.select(:id).filter(&:set_slug_tags!).map(&:id)
10
next if updated_exercise_ids.empty?
0 commit comments