summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index 82388cc..ebccedf 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -104,6 +104,10 @@ module Zorglub
@ext || ''
end
#
+ def mime! mime
+ @mime = mime
+ end
+ #
# class level basic node functions
#
class << self
@@ -315,10 +319,10 @@ module Zorglub
end
@state = ( @partial ? :partial : :view )
@content, mime = e.call v, self if e and v and File.exists? v
- @mime = mime unless mime.nil?
+ @mime ||= mime
@state = :layout
@content, mime = e.call l, self if e and l and File.exists? l
- @mime = mime unless mime.nil?
+ @mime = mime if @mime.nil? and not mime.nil?
end
#
end