Tweaked :locals example.

This commit is contained in:
Emanuele Vicentini 2011-05-02 11:08:09 +02:00
parent ab7dfa69a5
commit 71e520631c
1 changed files with 1 additions and 1 deletions

View File

@ -494,7 +494,7 @@ 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= bar.name', :locals => { :bar => foo }
end
This is typically used when rendering templates as partials from within