Skip to content

Instantly share code, notes, and snippets.

@manoelneto
Created June 26, 2021 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoelneto/e1c21b80de5f4557833af3216da7d905 to your computer and use it in GitHub Desktop.
Save manoelneto/e1c21b80de5f4557833af3216da7d905 to your computer and use it in GitHub Desktop.
def update_associated_rubrics
updateable_rubrics.in_batches(of: 100).each do |relation|
relation.transaction do
relation.lock.each do |rubric|
rubric.update_learning_outcome_criteria(self)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment