GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Merb Core: All you need. None you don't.
Homepage: http://www.merbivore.com
Clone URL: git://github.com/wycats/merb-core.git
Whoops, bug in #display. Plus gitignore.
wycats (author)
Thu Jan 17 19:16:22 -0800 2008
commit  15e92cc88c9797ee5f7d5b482850080ae803c1fd
tree    18c9d46d45ecdf6d4aa21c1491b3d8d37ea7777f
parent  97c324e33d60ac5738425d816bdda3c5bc3bb96a
...
144
145
146
147
148
149
 
 
 
 
150
151
152
...
196
197
198
199
200
201
202
 
203
204
 
205
206
207
...
144
145
146
 
 
 
147
148
149
150
151
152
153
...
197
198
199
 
 
200
201
202
203
 
204
205
206
207
0
@@ -144,9 +144,10 @@ module Merb::RenderMixin
0
     if opts[:layout]
0
       # Look for the layout under the default layout directly. If it's not found, reraise
0
       # the TemplateNotFound error
0
- (layout = Merb::Template.template_for(Merb.dir_for(:layout) / opts[:layout])) ||
0
- (raise TemplateNotFound, "No layout found at #{Merb.dir_for(:layout)}/#{layout}")
0
-
0
+ template = _template_location(opts[:layout], layout.index(".") ? content_type : nil, "layout")
0
+ layout = Merb::Template.template_for(_template_root / template) ||
0
+ (raise TemplateNotFound, "No layout found at #{_template_root / template}.*")
0
+
0
       # If the layout was found, call it
0
       send(layout)
0
     
0
@@ -196,12 +197,11 @@ module Merb::RenderMixin
0
     layout = _layout.to_s if _layout
0
     layout = layout.to_s if layout
0
     
0
- template = _template_location(layout, layout.index(".") ? content_type : nil, "layout")
0
-
0
     # If a layout was provided, throw an error if it's not found
0
     if layout
0
+ template = _template_location(layout, layout.index(".") ? content_type : nil, "layout")
0
       Merb::Template.template_for(_template_root / template) ||
0
- (raise TemplateNotFound, "No layout found at #{_template_root / template}")
0
+ (raise TemplateNotFound, "No layout found at #{_template_root / template}.*")
0
     
0
     # If a layout was not provided, try the default locations
0
     else

Comments

    No one has commented yet.