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
Adds template-checking code to branch where :with option is specified in 
partials.

Signed-off-by: Michael S. Klishin <michael@novemberain.com>
nanodeath (author)
Wed May 14 12:57:22 -0700 2008
michaelklishin (committer)
Wed May 14 13:37:33 -0700 2008
commit  3d0c6563f267d8910f9b03a3fbc562095da2f44e
tree    90d5682ee45d163e79c26e938f538eae3b853346
parent  5a8b976b1912323f15df55d7db38c7e673f1ae7c
...
271
272
273
274
 
 
 
 
 
275
276
277
...
271
272
273
 
274
275
276
277
278
279
280
281
0
@@ -271,7 +271,11 @@ module Merb::RenderMixin
0
       @_merb_partial_locals = opts
0
       sent_template = [with].flatten.map do |temp|
0
         @_merb_partial_locals[as.to_sym] = temp
0
- send(template_method)
0
+ if template_method && self.respond_to?(template_method)
0
+ send(template_method)
0
+ else
0
+ raise TemplateNotFound, "Could not find template at #{template_location}.*"
0
+ end
0
       end.join
0
     else
0
       @_merb_partial_locals = opts

Comments

    No one has commented yet.