lib/rabl/partials.rb in rabl-0.7.9 vs lib/rabl/partials.rb in rabl-0.7.10

- old
+ new

@@ -74,10 +74,11 @@ # pull format directly from rails unless it is html rendered_format = context_scope.lookup_context.rendered_format source_format = rendered_format unless rendered_format == :html context_scope.lookup_context.find(file, [], partial, [], {:formats => [source_format]}) end } - template = lookup_proc.call(false) rescue lookup_proc.call(true) + template = lookup_proc.call(false) rescue nil + template ||= lookup_proc.call(true) rescue nil template.identifier if template elsif source_format && context_scope.respond_to?(:view_paths) # Rails 2 template = context_scope.view_paths.find_template(file, source_format, false) template.filename if template end