Skip to content

Instantly share code, notes, and snippets.

@ebryn
Created December 1, 2010 22:04
Show Gist options
  • Save ebryn/724317 to your computer and use it in GitHub Desktop.
Save ebryn/724317 to your computer and use it in GitHub Desktop.
Company.all.each do |company|
begin
company.description = company.xml_document.description # could have bad characters which cause SQL error
company.save!
rescue => e
puts "FAIL! #{company.name}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment