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:
parent
13fc79d388
commit
06161bf714
1 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue