mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Add 'Associating File Extensions' section to README.
This commit is contained in:
parent
705c93f06b
commit
d7aa6a3b83
1 changed files with 8 additions and 0 deletions
|
@ -635,6 +635,14 @@ or disable them by default via <tt>set :haml, :layout => false</tt>.
|
|||
haml :index, :layout => !request.xhr?
|
||||
end
|
||||
|
||||
=== Associating File Extensions
|
||||
|
||||
To associate a file extension with a template engine, use
|
||||
<tt>Tilt.register</tt>. For instance, if you like to use the file extension
|
||||
+tt+ for Textile templates, you can do the following:
|
||||
|
||||
Tilt.register :tt, Tilt[:textile]
|
||||
|
||||
== Helpers
|
||||
|
||||
Use the top-level <tt>helpers</tt> method to define helper methods for use in
|
||||
|
|
Loading…
Reference in a new issue