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:

<div>stuff here</div>
<% content_for :title do %>
  <div>some dynamic title here</div>
<% 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/.