Changeset 162

Show
Ignore:
Timestamp:
09/18/2006 07:21:44 (2 years ago)
Author:
zimbatm
Message:

Now render doesn't render the layout around partials. See #76.

Location:
trunk/lib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/lib/camping-unabridged.rb

    r161 r162  
    338338      m=Mab.new({},self) 
    339339      s=m.capture{send(*a,&b)} 
    340       s=m.layout{s} if m.respond_to?:layout 
     340      s=m.layout{s} if /^_/!~a[0].to_s and m.respond_to?:layout 
    341341      s 
    342342    end 
  • trunk/lib/camping.rb

    r161 r162  
    99:cookies,:env,:headers,:body,:status,:root;def method_missing*a,&b 
    1010a.shift if a[0]==:render;m=Mab.new({},self);s=m.capture{send(*a,&b)};s=m.layout{s}if 
    11 m.respond_to?:layout;s end;def r s,b,h={};@status=s;@headers. 
     11/^_/!~a[0].to_s and m.respond_to?:layout;s end;def r s,b,h={};@status=s;@headers.  
    1212merge!h;@body=b end;def redirect*a;r 302,'','Location'=>URL(*a)end;Z="\r\n" 
    1313def initialize r,e,m;e=H[e.to_hash];@status,@method,@env,@headers,@root=200,m.