From 91fe0ba6580c38643506350f9b43781a143fe3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 3 Jan 2012 23:18:24 +0100 Subject: Node: add @action[:mode] to allow differenciation between view and layout rendering --- lib/zorglub/node.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index e8b0b13..6cf0b20 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -105,7 +105,9 @@ module Zorglub @content = self.send @action[:method], *@action[:args] e, v, l = Config.engine_proc(@action[:engine]), view, layout # TODO compile and cache + @action[:mode]=:view @content = e.call v, self if e and File.exists? v + @action[:mode]=:layout @content = e.call l, self if e and File.exists? l Node.call_after_hooks self @content -- cgit v1.1-2-g2b99