mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-05 03:14:43 +08:00
replace .find with .find_each
This commit is contained in:
parent
4f7f257b78
commit
b6a4a5326f
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class FixLastChangedByOnSteps < ActiveRecord::Migration[6.1]
|
|||
# because we're not recording the changes to last_modified_by_id
|
||||
|
||||
def up
|
||||
Step.where(last_modified_by_id: nil).each do |step|
|
||||
Step.where(last_modified_by_id: nil).find_each do |step|
|
||||
# Try to find corresponding activity, if step was changed activity should exist
|
||||
# we cannot completely rely on that, so for the fallback we use the step user
|
||||
activity = Activity
|
||||
|
|
Loading…
Add table
Reference in a new issue