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.
1 parent 14936ba commit ee5616fCopy full SHA for ee5616f
app/routines/update_slugs.rb
@@ -6,7 +6,7 @@ class UpdateSlugs
6
def exec
7
Exercise.preload(:publication).in_batches(of: 100, load: true) do |exercises|
8
Exercise.transaction do
9
- updated_exercise_ids = exercises.filter(&:set_slug_tags!).map(&:id)
+ updated_exercise_ids = exercises.select(:id).filter(&:set_slug_tags!).map(&:id)
10
next if updated_exercise_ids.empty?
11
12
Exercise.where(id: updated_exercise_ids).update_all updated_at: Time.current
0 commit comments