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:
before "testpage.html.erb" do
layout 'layout.html.erb'
end
layout.html.erb
<html>
<body>
<%= yield %>
</body>
</html>
testpage.html.erb
<strong>working!</strong>
RESULT
/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 `<top (required)>'
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 `<main>'
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:
layout.html.erb
testpage.html.erb
RESULT