winton/stasis — Issue #35: Stasis yield returns "no block given"
Author: JeanMertz
Created: 2012-02-09 15:03:25+00:00
State: open

I am trying to get the layout system working, but I'm having a brainmelt and can't for the life of me get this thing working.

**controller.rb:**

```ruby
before "testpage.html.erb" do
layout 'layout.html.erb'
end
```

**layout.html.erb**

```html

<%= yield %>

```

**testpage.html.erb**

```html
working!
```

**RESULT**

```bash
/Users/Jean/website/app/layout.hml.erb:54:in `evaluate_source': no block given (yield) (LocalJumpError)
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `instance_eval'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/tilt-1.3.3/lib/tilt/template.rb:209:in `evaluate_source'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/tilt-1.3.3/lib/tilt/template.rb:144:in `cached_evaluate'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/tilt-1.3.3/lib/tilt/template.rb:127:in `evaluate'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/stasis-0.1.14/lib/stasis/plugins/render.rb:45:in `render'
from (eval):8:in `render'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/stasis-0.1.14/lib/stasis.rb:186:in `block in render'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/stasis-0.1.14/lib/stasis.rb:139:in `each'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/stasis-0.1.14/lib/stasis.rb:139:in `render'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/gems/stasis-0.1.14/bin/stasis:27:in `'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/bin/stasis:19:in `load'
from /Users/Jean/.rvm/gems/ruby-1.9.3-p0@global/bin/stasis:19:in `

'
```