[Jifty-commit] r7109 - in jifty/trunk: lib/Jifty/Plugin/REST

Jifty commits jifty-commit at lists.jifty.org
Tue May 26 15:13:51 EDT 2009


Author: jesse
Date: Tue May 26 15:13:46 2009
New Revision: 7109

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm

Log:
 r63674 at 17h:  jesse | 2009-05-26 15:12:24 -0400
 Make the jifty REST dispatcher able to show nested objects


Modified: jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm	Tue May 26 15:13:46 2009
@@ -330,9 +330,13 @@
     if (ref($content) eq 'ARRAY') {
         return start_html(-encoding => 'UTF-8', -declare_xml => 1, -title => 'REST API'),
               ul(map {
-                  li($prefix ?
+                ref($_) eq 'HASH' ? render_as_html($url, $prefix,$_) :
+                    li(
+                    ref($_) eq 'ARRAY' ? render_as_html($url, $prefix,$_) :
+                      
+                      ($prefix ?
                      a({-href => "$url/".Jifty::Web->escape_uri($_)}, Jifty::Web->escape($_))
-                     : Jifty::Web->escape($_) )
+                     : Jifty::Web->escape($_) ))
               } @{$content}),
               end_html();
     }


More information about the Jifty-commit mailing list