Skip to content

Commit

Permalink
Give useful information when no template is found for a partial
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Apr 24, 2008
1 parent 73291f1 commit dfecddf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/merb-core/controller/mixins/render.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ def partial(template, opts={})
end.join
else
@_merb_partial_locals = opts
sent_template = send(template_method)
if template_method && self.respond_to?(template_method)
sent_template = send(template_method)
else
raise TemplateNotFound, "Could not find template at #{template_location}.*"
end
end
@_merb_partial_locals = @_old_partial_locals.pop
sent_template
Expand Down

0 comments on commit dfecddf

Please sign in to comment.