sinatra/sinatra-contrib — Issue #25: content_for w/ slim
Author: tkellen
Created: 2011-11-27 05:39:43+00:00
State: open

I'm not sure if I should be posting this here or on the Slim repo, but content_for is broken using this templating engine.

**Test Case**

app.rb:

```ruby
require 'slim'
require 'haml'
require 'sinatra/base'
require 'sinatra/content_for'

class Main < Sinatra::Base

helpers Sinatra::ContentFor

get '/' do
slim :test
end

end
```

views/layout.slim:

```ruby
html
head
meta charset='utf8'
title test
body
== yield
== yield_content :test
```

views/test.slim

```ruby
- content_for :test do
test content

h1 page title

h2 page subtitle
```

... the block return isn't working correctly, it sends the entire template. Using = content_for works, but since that returns a proc, it prints #[