diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-17 13:55:47 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-17 13:55:47 +0100 |
commit | 048e30bda454293e36dc84b824b0c8fb3bf62dcb (patch) | |
tree | 720152c15140de764c900b25eebcb457e76043cc /example | |
parent | 4ede655abcd1fd3a0e7981759720a4243a744c88 (diff) | |
download | zorglub-048e30bda454293e36dc84b824b0c8fb3bf62dcb.zip zorglub-048e30bda454293e36dc84b824b0c8fb3bf62dcb.tar.gz |
update example/sample.ru to follow last updates
Diffstat (limited to 'example')
-rw-r--r-- | example/sample.ru | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/example/sample.ru b/example/sample.ru index c7b22b2..a31aa8a 100644 --- a/example/sample.ru +++ b/example/sample.ru @@ -12,13 +12,6 @@ else require 'zorglub/session' end # -HAML_PROC = Proc.new { |path,obj| Haml::Engine.new( File.open(path,'r').read ).render(obj) } -Zorglub::Config.register_engine 'tmp-engine', 'haml', HAML_PROC -# -Zorglub::Config.engine = :haml -Zorglub::Config.session_on = true -Zorglub::Config.root = File.dirname( File.absolute_path(__FILE__) ) -# class Zorglub::Node @count=0 class << self @@ -64,7 +57,15 @@ class Node1 < Zorglub::Node # end # +HAML_PROC = Proc.new { |path,obj| Haml::Engine.new( File.open(path,'r').read ).render(obj) } +# APP = Zorglub::App.new do + register_engine! :haml, 'haml', Zorglub::Engines::Haml.method(:proc) + register_engine! 'tmp-engine', 'haml', HAML_PROC + opt! :debug, true + opt! :engine, :haml + opt!:root, File.dirname( File.absolute_path(__FILE__) ) + opt(:session_options)[:session_on] = true map '/url1', Node1 end # |