Skip to content

Instantly share code, notes, and snippets.

@jrom
Created January 3, 2012 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrom/1555983 to your computer and use it in GitHub Desktop.
Save jrom/1555983 to your computer and use it in GitHub Desktop.
Saves trimmer templates to tmp/trimmer
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