Created
January 3, 2012 17:36
-
-
Save jrom/1555983 to your computer and use it in GitHub Desktop.
Saves trimmer templates to tmp/trimmer
This file contains hidden or 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
tmp_path = 'tmp/trimmer' | |
FileUtils.mkdir_p(tmp_path) | |
I18n.available_locales.each do |locale| | |
app.get("/trimmer/#{locale}.js") | |
File.open("#{tmp_path}/#{locale}.js", 'w') do |f| | |
f.write(app.response.body.force_encoding('utf-8')) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment