1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Tweaked :locals example.

This commit is contained in:
Emanuele Vicentini 2011-05-02 11:08:09 +02:00
parent ab7dfa69a5
commit 71e520631c

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