Created
February 15, 2012 08:36
-
-
Save Vaysman/1834468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlahBlah < ActiveRecord::Migration | |
def up | |
puts "Records: #{TestResult.count}\n" | |
Feature.destroy_all | |
TestResult.all.each do |e| | |
begin | |
e.update_attribute(:generated, nil) | |
rescue ActiveRecord::RecordInvalid => er | |
puts "###\nId: #{er.record.id}\n###\nErrors:\n\t#{er.record.errors.full_messages.join("\n")}\n" | |
end | |
end | |
end | |
def down | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment