summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-05 12:04:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-05 12:04:43 +0100
commit0827f783531b318af55a1048ad69ee4c112e0873 (patch)
tree1f9bbb8f1e3f6ec8a8dc53466ecb8816f1ffc1ca /lib
parent145714edebd9af891836d10ea17cab5007833e87 (diff)
downloadzorglub-0827f783531b318af55a1048ad69ee4c112e0873.zip
zorglub-0827f783531b318af55a1048ad69ee4c112e0873.tar.gz
Node: fix mime-type override and add spec
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index 68e535b..c85e42d 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -121,9 +121,11 @@ module Zorglub
@content = self.send @options[:method], *@options[:args]
v, l, e = view, layout, Config.engine_proc(@options[:engine])
state (@options[:layout].nil? ? :partial : :view)
- @content, @mime = e.call v, self if e and File.exists? v
+ @content, mime = e.call v, self if e and File.exists? v
+ @mime = mime unless mime.nil?
state :layout
- @content, @mime = e.call l, self if e and File.exists? l
+ @content, mime = e.call l, self if e and File.exists? l
+ @mime = mime unless mime.nil?
state :post_cb
Node.call_after_hooks self
state :finished