Skip to content

Instantly share code, notes, and snippets.

@jontonsoup
Created February 9, 2013 04:11
Show Gist options
  • Save jontonsoup/4743796 to your computer and use it in GitHub Desktop.
Save jontonsoup/4743796 to your computer and use it in GitHub Desktop.
desc "Renames all .html.erb files to .html.haml"
task :haml do
print "looking for erb views..\n"
files = `find ./app/views -name *.html.erb`
files.each_line do |file|
file.strip!
print "parsing file: #{file}\n"
`mv #{file} #{file.gsub(/\.erb$/, ".haml")}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment