summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-04 01:32:51 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-04 01:32:51 +0100
commit18777bb83937837f673f3876c96b7fb8ce59835e (patch)
treec157de73bf0277982d449942379881a29b5e5893
parent4ea25ec27d1ec21f3945d0c9f34a5628c25d2aa4 (diff)
downloadzorglub-18777bb83937837f673f3876c96b7fb8ce59835e.zip
zorglub-18777bb83937837f673f3876c96b7fb8ce59835e.tar.gz
add Node#no_layout and use it
-rw-r--r--lib/zorglub/node.rb4
-rw-r--r--spec/spec_helper.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index f2aaa72..669f2c4 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -136,6 +136,10 @@ module Zorglub
File.join(Config.layout_base_path, @action[:layout])+ Config.engine_ext(@action[:engine])
end
#
+ def no_layout
+ @action[:layout] = nil
+ end
+ #
def view view=nil
@action[:view] = view unless view.nil? or view.empty?
return '' if @action[:view].nil?
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 7cd6428..5297cb5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -47,7 +47,7 @@ class Node0 < Zorglub::Node
html
end
def hello
- layout 'none'
+ no_layout
'world'
end
def with_2args a1, a2