Commit 90c77cdb1376272fb8abd5502bd49ed4f427ecbe

Authored by Rodrigo Souto
1 parent bd82cfdb

Using find_each on abuse_complaint migration instead of all.each

db/migrate/20130429214630_destroy_inconsistent_abuse_complaints.rb
1 1 class DestroyInconsistentAbuseComplaints < ActiveRecord::Migration
2 2 def self.up
3   - AbuseComplaint.all.each do |ac|
  3 + AbuseComplaint.find_each do |ac|
4 4 if ac.reported.nil?
5 5 ac.destroy
6 6 end
... ...