Posts Tagged ‘erb’

Embedding other templates in Sinatra ERB templates

Sunday, November 4th, 2012 | Programming, Tech

If you are using the Sinatra framework in Ruby, and you want to embed one ERB template in another, you can do this simply by using the ERB template tag like you can in your regular Ruby code.

<%= erb :welcome %>

Replace “welcome” with your template name as you usually do.