Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## just slap this in your rake file or in lib/tasks namespace 'views' do desc 'Renames all your rhtml views to erb' task 'rename' do Dir.glob('app/views/**/*.rhtml').each do |file| puts `svn mv #{file} #{file.gsub(/\.rhtml$/, '.erb')}` end end end ## or if you have rhtml and rxml you could probably use the following (untested) namespace 'views' do desc 'Renames all your rhtml views to erb' task 'rename' do Dir.glob('app/views/**/*.rhtml').each do |file| puts `svn mv #{file} #{file.gsub(/\.(rhtml|rxml)$/, '.erb')}` end end end
This paste will be private.
From the Design Piracy series on my blog: