From: "Mateusz W." Date: 2012-07-06T22:29:38+09:00 Subject: Erb templating and output buffer Hey guys, I am trying to develop 'content_for' functionality for my Sinatra application. I know there are gems out there for that, but I want to keep my application with little overhead and few dependencies. I am running into problems with Erb / Sinatra and how it handles the output. For example, let's say I have something like:
stuff here
<% content_for :title do %>
some dynamic title here
<% end %> Now, when I yield the output with block.call, I don't get "just the block" (which I would expect to get), but a whole bunch of stuff prior to content_for :title. How can I get the content of the block itself, rather than the full output buffer? Actually, I'm not even sure if the output buffer here is the problem, just my best guess. Thanks much for help! Mateusz -- Posted via http://www.ruby-forum.com/.