diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-06 10:07:38 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-06 10:07:38 +0100 |
commit | 8dd007b3978d855ee3984b3c3f59b3eb4281b8fa (patch) | |
tree | 6c7137fb9db8aa5b64935c7865139bc5554cf428 /lib | |
parent | df5e1a8e31104b6cb92689c3d82b0c47b77230f1 (diff) | |
download | zorglub-8dd007b3978d855ee3984b3c3f59b3eb4281b8fa.zip zorglub-8dd007b3978d855ee3984b3c3f59b3eb4281b8fa.tar.gz |
fix haml engine, add spec
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zorglub/engines/haml.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/zorglub/engines/haml.rb b/lib/zorglub/engines/haml.rb index a0353f7..458f29a 100644 --- a/lib/zorglub/engines/haml.rb +++ b/lib/zorglub/engines/haml.rb @@ -9,9 +9,9 @@ module Zorglub def self.proc path,obj if Zorglub::Config.engines_cache_enabled key = path.sub Zorglub::Config.root,'' - haml = obj.app.engines_cache[key] ||= ::Haml::Engine.new( File.open(path,'r'){|f| f.read }, Zorglub::Config.haml_options ) + haml = obj.app.engines_cache[key] ||= ::Haml::Engine.new( ::File.open(path,'r'){|f| f.read }, Zorglub::Config.haml_options ) else - haml = ::Haml::Engine.new( File.open(path,'r'){|f| f.read }, Zorglub::Config.haml_options ) + haml = ::Haml::Engine.new( ::File.open(path,'r'){|f| f.read }, Zorglub::Config.haml_options ) end html = haml.render(obj) return html, 'text/html' |