From 023adfb4cf3fb03f194fcf2a1162372debd4c308 Mon Sep 17 00:00:00 2001 From: Jonas Pfenniger Date: Mon, 17 Sep 2007 21:14:53 +0000 Subject: [PATCH] Fix for bug #137, patch by msg. Works for me too :) --- lib/camping.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/camping.rb b/lib/camping.rb index 2abeb6f..e7c14c5 100644 --- a/lib/camping.rb +++ b/lib/camping.rb @@ -7,7 +7,7 @@ module Camping;Apps=[];C=self;S=IO.read(__FILE__).sub(/S=I.+$/,'') c=self/c;c="//"+@env.HTTP_HOST+c if c[/^\//];URI(c)end;def/p;p[/^\//]?@root+p : p end;def errors_for o;ul.errors{o.errors.each_full{|x|li x}}if o.errors.any?end end;module Base;include Helpers;attr_accessor:input,:cookies,:env,:headers,:body, -:status,:root;def method_missing*a,&b;a.shift if a[0]==:render;m=Mab.new {},self +:status,:root;def method_missing*a,&b;a.shift if a[0]==:render;m=Mab.new({},self) s=m.capture{send(*a,&b)};s=m.capture{send(:layout){s}} if /^_/!~a[0].to_s and m. respond_to?:layout;s end;def r s,b,h={};@status=s;@headers.merge!h;@body=b end def redirect*a;r 302,'','Location'=>URL(*a)end;Z="\r\n";def to_a;[@status,@body,