Skip to content

Instantly share code, notes, and snippets.

@allaire
Created November 4, 2013 03:27
Show Gist options
  • Save allaire/7297691 to your computer and use it in GitHub Desktop.
Save allaire/7297691 to your computer and use it in GitHub Desktop.
Ryan Bates template method adapted for Capistrano v3
def template(from, to)
template_path = File.expand_path("../templates/#{from}", __FILE__)
template = ERB.new(File.new(template_path).read).result(binding)
upload! StringIO.new(template), to
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment