add 'Agregando Tu Propio Motor de Renderizado' section to spanish readme

This commit is contained in:
Gabriel Andretta 2011-01-12 20:00:07 -03:00
parent e85b0976c0
commit 56bb2fcc43
1 changed files with 17 additions and 0 deletions

View File

@ -657,6 +657,23 @@ las plantillas Textitle, podés hacer lo siguiente:
Tilt.register :tt, Tilt[:textile]
=== Agregando Tu Propio Motor de Renderizado
Primero, registrá tu motor con Tilt, y después, creá tu método de renderizado:
Tilt.register :mipg, MiMotorParaPlantillaGenial
helpers do
def mypg(*args) render(:mypg, *args) end
end
get '/' do
mypg :index
end
Renderiza <tt>./views/index.mypg</tt>. Mirá https://github.com/rtomayko/tilt
para aprender más de Tilt.
== Ayudantes
Usá el método top-level <tt>helpers</tt> para definir métodos ayudantes que