Skip to content

Instantly share code, notes, and snippets.

@lucascaton
Created May 6, 2011 18:10
Show Gist options
  • Save lucascaton/959465 to your computer and use it in GitHub Desktop.
Save lucascaton/959465 to your computer and use it in GitHub Desktop.
User.all.each do |u|
puts "Processing user [#{u.id}]"
if u.name.present?
u.name = u.name.gsub(/ã/, 'ã').gsub(/á/, 'á').gsub(/ê/, 'ê').gsub(/é/, 'é').gsub(/à /, 'í').gsub(/ó/, 'ó').gsub(/õ/, 'õ').gsub(/ú/, 'ú').gsub(/ç/, 'ç').gsub(/Ã/, 'à')
u.save
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment