Skip to content

Commit

Permalink
Write to template buffer for erubi and erubis
Browse files Browse the repository at this point in the history
  • Loading branch information
jkowens committed Dec 8, 2018
1 parent a3339e0 commit ac36e38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sinatra-contrib/lib/sinatra/content_for.rb
Expand Up @@ -177,7 +177,9 @@ def yield_content(key, *args, &block)
else
content = content_blocks[key.to_sym].map { |b| capture(*args, &b) }
content.join.tap do |c|
@_out_buf << c if block_given? && erb?
if block_given? && (erb? || erubi? || erubis?)
@_out_buf << c
end
end
end
end
Expand Down

0 comments on commit ac36e38

Please sign in to comment.