1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Note on passing template symbols vs. strings in README

The README is very ambiguous about the difference between passing a
symbol and a string to a template rendering method. This adds a note
that explains the difference.
This commit is contained in:
Markus Prinz 2009-03-25 09:45:48 -07:00 committed by Ryan Tomayko
parent 13fc79d388
commit 06161bf714

View file

@ -109,6 +109,11 @@ directory. To use a different views directory:
set :views, File.dirname(__FILE__) + '/templates'
One important thing to remember is that you always have to reference
templates with symbols, even if they're in a subdirectory (in this
case use <tt>:'subdir/template'</tt>). Rendering methods will render
any strings passed to them directly.
=== Haml Templates
The haml gem/library is required to render HAML templates: