Skip to content

Instantly share code, notes, and snippets.

@methodmissing
Created December 31, 2008 01:39
Show Gist options
  • Select an option

  • Save methodmissing/41837 to your computer and use it in GitHub Desktop.

Select an option

Save methodmissing/41837 to your computer and use it in GitHub Desktop.
namespace 'views' do
desc 'Renames all your html.erb views to erb'
task 'rename' do
Dir.glob('app/views/**/*.html.erb').each do |file|
puts "#{file} -> #{file.gsub(/\.html.erb$/, '.erb')}"
#puts `mv #{file} #{file.gsub(/\.html.erb$/, '.erb')}`
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment