mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Tweaked :locals example.
This commit is contained in:
parent
ab7dfa69a5
commit
71e520631c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue