Modded ErubisTemplate that doesn’t insist in an String as output buffer.
@api private
In preamble we need a flag `__in_erb_template` and SafeBuffer for padrino apps.
# File lib/padrino/rendering/erubis_template.rb, line 53 def precompiled_preamble(locals) original = super return original unless @is_padrino_app "__in_erb_template = true\n" << original.rpartition("\n").first << "#{@outvar} = _buf = SafeBuffer.new\n" end
# File lib/padrino/rendering/erubis_template.rb, line 42 def render(*args) app = args.first app_class = app.class @is_padrino_app = (defined?(Padrino::Application) && app.kind_of?(Padrino::Application)) || (app_class.respond_to?(:erb) && app_class.erb[:engine_class] == Padrino::Rendering::SafeEruby) super end