Skip to content

Instantly share code, notes, and snippets.

@yannlugrin
Created September 20, 2010 15:12
Show Gist options
  • Save yannlugrin/588043 to your computer and use it in GitHub Desktop.
Save yannlugrin/588043 to your computer and use it in GitHub Desktop.
Dir[Rails.root.join('**', '*.rb')].each do |f|
c = File.open(f).read
File.open(f, 'w').write("# encoding: UTF-8\n" + c)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment