diff --git a/lib/toto.rb b/lib/toto.rb index d74b920..d59ae33 100644 --- a/lib/toto.rb +++ b/lib/toto.rb @@ -165,8 +165,7 @@ def title end def render page, type - content = to_html page, @config - type == :html ? to_html(:layout, @config, &Proc.new { content }) : send(:"to_#{type}", page) + type == :html ? to_html(:layout, @config, &Proc.new { to_html(page, @config) }) : send(:"to_#{type}", page) end def to_xml page