[Jifty-commit] r3097 - in jifty/trunk: lib/Jifty lib/auto

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Apr 4 19:53:34 EDT 2007


Author: alexmv
Date: Wed Apr  4 19:53:33 2007
New Revision: 3097

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

Log:
 r18733 at zoq-fot-pik:  chmrr | 2007-04-04 19:53:06 -0400
  * Typo fix in example in POD
  * Remove old, unused empty directory


Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm	(original)
+++ jifty/trunk/lib/Jifty/Action.pm	Wed Apr  4 19:53:33 2007
@@ -1185,7 +1185,7 @@
           value    => '%$value%',
       );
 
-      return map { $_->name } @{ $foos->item_array_ref };
+      return map { $_->name } @{ $foos->items_array_ref };
   }
 
 In this example, the "foo" field is autocompleted from names matched from the C<MyApp::Model::Foo> table. The match, in this case, matches any substring found in the database. I could have matched any item that starts with the string, ends with the string, matches other fields than the one returned, etc. It's up to you to decide.
@@ -1195,7 +1195,7 @@
 If you need a more complicated solution, you can return the autocompletion values as a list of hash references containing the keys C<value> and (optionally) C<label>:
 
   return map { { value => $_->name, label => $_->label } }
-            @{ $foos->item_array_ref };
+            @{ $foos->items_array_ref };
 
 In this case, the labels will be shown to the client, but the selected value would be returned to your application.
 


More information about the Jifty-commit mailing list