Last active
April 3, 2018 07:14
-
-
Save GalenkoEugene/ce99f004b7729285eda057936c20e526 to your computer and use it in GitHub Desktop.
converts all rhtml files to html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# converts all rhtml files to html.erb | |
require 'fileutils' | |
files = `find app/views -name '*.rhtml'` | |
file_ary = files.split("\n") | |
file_ary.each do |file| | |
new_file = file.gsub('rhtml', 'html.erb') | |
FileUtils.mv file, new_file | |
end | |
puts "#{file_ary.length} files converted." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment