fix documentation of variable interpolation into templates

This commit is contained in:
Ben Bleything 2008-11-30 09:21:32 -08:00 committed by Ryan Tomayko
parent 18723bb8af
commit 95aca7612e
1 changed files with 2 additions and 2 deletions

View File

@ -140,14 +140,14 @@ blocks can be accessed direcly in views:
get '/:id' do
@foo = Foo.find(params[:id])
haml '%h1== @foo.name'
haml '%h1= @foo.name'
end
Or, specify an explicit Hash of local variables:
get '/:id' do
foo = Foo.find(params[:id])
haml '%h1== foo.name', :locals => { :foo => foo }
haml '%h1= foo.name', :locals => { :foo => foo }
end
This is typically used when rendering templates as partials from within