Created
January 19, 2012 17:14
-
-
Save kapowaz/1641264 to your computer and use it in GitHub Desktop.
Register .html as a template type within a Sinatra app by aliasing ERB
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
| class MyApp < Sinatra::Base | |
| Tilt.register Tilt::ERBTemplate, :html | |
| module TemplateHelpers | |
| def html(*args) | |
| render :html, *args | |
| end | |
| end | |
| helpers TemplateHelpers | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment