summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-05 09:56:36 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-05 09:56:36 +0100
commit5d14ef1baf615197e6ad5fc9aee5e72ba8b9fbd4 (patch)
tree9bb2372b08a4112a4ad13c1ce043fa3717451489
parent30728f1b8b3ea3f48b3ca50def72670af8fdf570 (diff)
downloadzorglub-5d14ef1baf615197e6ad5fc9aee5e72ba8b9fbd4.zip
zorglub-5d14ef1baf615197e6ad5fc9aee5e72ba8b9fbd4.tar.gz
example: use zorglub/engines/haml
-rw-r--r--example/sample.ru5
1 files changed, 2 insertions, 3 deletions
diff --git a/example/sample.ru b/example/sample.ru
index 3c1af4e..0838b4e 100644
--- a/example/sample.ru
+++ b/example/sample.ru
@@ -5,18 +5,17 @@ $LOAD_PATH << File.join(File.dirname( File.absolute_path(__FILE__)), '..', 'lib'
USE_RACK_SESSION=false
#
require 'zorglub'
+require 'zorglub/engines/haml'
if USE_RACK_SESSION
require 'zorglub/rack_session'
else
require 'zorglub/session'
end
#
-require 'haml'
HAML_PROC = Proc.new { |path,obj| Haml::Engine.new( File.open(path,'r').read ).render(obj) }
-Zorglub::Config.register_engine 'haml', 'haml', HAML_PROC
Zorglub::Config.register_engine 'tmp-engine', 'haml', HAML_PROC
#
-Zorglub::Config.engine = 'haml'
+Zorglub::Config.engine = :haml
Zorglub::Config.session_on = true
Zorglub::Config.root = File.dirname( File.absolute_path(__FILE__) )
#