Correct query so it scopes correctly

This commit is contained in:
Sam 2014-05-27 22:17:04 +10:00
parent 7c6a0c7690
commit ce6c25afed
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ module Jobs
# backfill in batches 1000 an hour
User.where(uploaded_avatar_id: nil)
.order("last_posted_at desc")
.limit(1000).find_each do |u|
.limit(1000).each do |u|
u.refresh_avatar
u.save
end