README.rdoc in rtomayko-sinatra-0.3.2 vs README.rdoc in rtomayko-sinatra-0.3.3
- old
+ new
@@ -138,17 +138,17 @@
used to evaluate event blocks. Instance variables set in event
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
other templates.