[Jifty-commit] r2593 - in jifty/trunk: doc lib/Jifty/Action lib/Jifty/Plugin/REST

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Jan 26 08:30:59 EST 2007


Author: jesse
Date: Fri Jan 26 08:30:58 2007
New Revision: 2593

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/doc/jifty-model-svk
   jifty/trunk/lib/Jifty/Action/Record.pm
   jifty/trunk/lib/Jifty/Plugin/REST/Dispatcher.pm

Log:
 r21389 at hualien:  jesse | 2007-01-26 21:24:50 +0800
  * updating to new max_length name for the parameter formerly known as 'length'


Modified: jifty/trunk/doc/jifty-model-svk
==============================================================================
--- jifty/trunk/doc/jifty-model-svk	(original)
+++ jifty/trunk/doc/jifty-model-svk	Fri Jan 26 08:30:58 2007
@@ -43,8 +43,60 @@
         - Jifty::Collection
 
 
+=head4 Jifty::Record
 
+Methods:
 
+=over
+
+=item create
+
+=item set
+
+=item value (get)
+
+=item delete
+
+=item 
+
+
+
+=back
+
+
+=head4 Jifty::Collection
+
+=over
+
+=item next
+
+=item items_array_ref
+
+=item unlimit
+
+=item search 
+
+This is a new API. It replaces Jifty::DBI::Record's "limit"
+
+
+My $tasks = MyApp::Model::TaskCollection->new();
+
+grep { $_->summary =~ 'foo'} grep { $_->owner 
+
+
+# Tasks with a summary matching 'patch' AND  with patches (computed)
+
+$tasks->with( summary => qr/patch/)->with( sub { $_->has_patches()  } ) 
+
+# Tasks with a summary matching 'patch' or with patches (computed)
+
+$tasks->in( $tasks->with(summary => qr/patch), $tasks->with(sub {$_->has_patches}))
+
+# Tasks with a summary that doesn't match 'patch' with patches
+$tasks->without( summary => qr/patch/)->with( sub { $_->has_patches()  } ) 
+
+
+=back
 
 =head2 Data storage format (In SVN)
 

Modified: jifty/trunk/lib/Jifty/Action/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record.pm	Fri Jan 26 08:30:58 2007
@@ -303,7 +303,7 @@
             }
 
             # If we're hand-coding a render_as, hints or label, let's use it.
-            for (qw(render_as label hints length mandatory sort_order)) {
+            for (qw(render_as label hints max_length mandatory sort_order)) {
 
                 if ( defined (my $val = $column->$_) ) {
                     $info->{$_} = $val;

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	Fri Jan 26 08:30:58 2007
@@ -327,7 +327,7 @@
     type
     default
     readable writable
-    length
+    max_length
     mandatory
     distinct
     sort_order


More information about the Jifty-commit mailing list