diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 23:18:24 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 23:18:24 +0100 |
commit | 91fe0ba6580c38643506350f9b43781a143fe3aa (patch) | |
tree | 445deca74e2b9705dfa7fd2414d2908f38c9a0c7 /lib | |
parent | dba8a2aad7ae72c73e5629b49e782e235eb404b6 (diff) | |
download | zorglub-91fe0ba6580c38643506350f9b43781a143fe3aa.zip zorglub-91fe0ba6580c38643506350f9b43781a143fe3aa.tar.gz |
Node: add @action[:mode] to allow differenciation between view and layout rendering
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zorglub/node.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |