[Jifty-commit] r953 - in jifty/trunk: lib/Jifty/Action

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Apr 28 02:06:54 EDT 2006


Author: alexmv
Date: Fri Apr 28 02:06:53 2006
New Revision: 953

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Action/Record.pm

Log:
 r12676 at zoq-fot-pik:  chmrr | 2006-04-28 02:01:51 -0400
  * Check if it can ->name before calling


Modified: jifty/trunk/lib/Jifty/Action/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record.pm	Fri Apr 28 02:06:53 2006
@@ -163,7 +163,7 @@
 
           # XXX This assumes a ->name and a ->id method
           $info->{valid_values} = [
-            { display_from => 'name',
+            { display_from => $refers_to->can('name') ? "name" : "id",
               value_from   => 'id',
               collection   => $collection
             }


More information about the Jifty-commit mailing list