From 44f5d9f92e55c9d76e9310eda99f203af2c919ef Mon Sep 17 00:00:00 2001 From: Andrey Koleshko Date: Sat, 3 Mar 2012 04:47:14 +0300 Subject: [PATCH] Fix render custom templates for xml type --- lib/toto.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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