Commit 90c77cdb1376272fb8abd5502bd49ed4f427ecbe
1 parent
bd82cfdb
Exists in
master
and in
22 other branches
Using find_each on abuse_complaint migration instead of all.each
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
db/migrate/20130429214630_destroy_inconsistent_abuse_complaints.rb
1 | class DestroyInconsistentAbuseComplaints < ActiveRecord::Migration | 1 | class DestroyInconsistentAbuseComplaints < ActiveRecord::Migration |
2 | def self.up | 2 | def self.up |
3 | - AbuseComplaint.all.each do |ac| | 3 | + AbuseComplaint.find_each do |ac| |
4 | if ac.reported.nil? | 4 | if ac.reported.nil? |
5 | ac.destroy | 5 | ac.destroy |
6 | end | 6 | end |