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

Jifty commits jifty-commit at lists.jifty.org
Mon Jul 14 17:58:14 EDT 2008

Author: sartak
Date: Mon Jul 14 17:58:14 2008
New Revision: 5547

   jifty/trunk/   (props changed)

 r64272 at onn:  sartak | 2008-07-14 17:50:21 -0400
 Some doc for extending your REST interface's object dump

Modified: jifty/trunk/lib/Jifty/Plugin/REST.pm
--- jifty/trunk/lib/Jifty/Plugin/REST.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/REST.pm	Mon Jul 14 17:58:14 2008
@@ -25,6 +25,14 @@
 See the URL /=/help in your Jifty app for more information about
 how to access the RESTian resources.
+=head1 MISC
+The REST interface calls a method named C<jifty_serialize_format> on
+records and collections to downgrade them to simple data structures. By
+default, this just lists the attributes specified with "column".  If you want
+to include calculated values in your REST interface, you can do so by
+overriding C<jifty_serialize_format>.

Modified: jifty/trunk/lib/Jifty/Record.pm
--- jifty/trunk/lib/Jifty/Record.pm	(original)
+++ jifty/trunk/lib/Jifty/Record.pm	Mon Jul 14 17:58:14 2008
@@ -849,7 +849,8 @@
 This is used to create a hash reference of the object's values. Unlike
 Jifty::DBI::Record->as_hash, this won't transform refers_to columns into JDBI
+objects. Override this if you want to include calculated values (for use in,
+say, your REST interface)

More information about the Jifty-commit mailing list