[Catalyst-commits] r9232 - in Catalyst-Manual/5.70/trunk: . lib/Catalyst/Manual/Tutorial/AdvancedCRUD

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri Feb 6 15:19:34 GMT 2009


Author: t0m
Date: 2009-02-06 15:19:34 +0000 (Fri, 06 Feb 2009)
New Revision: 9232

Modified:
   Catalyst-Manual/5.70/trunk/Changes
   Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod
Log:
Apply manual patch from Del Merritt

Modified: Catalyst-Manual/5.70/trunk/Changes
===================================================================
--- Catalyst-Manual/5.70/trunk/Changes	2009-02-06 10:24:53 UTC (rev 9231)
+++ Catalyst-Manual/5.70/trunk/Changes	2009-02-06 15:19:34 UTC (rev 9232)
@@ -1,8 +1,9 @@
 Revision history for Catalyst-Manual
 
 5.7XXX  XXX
+        - Change FormFu tutorial to not use deprecated methods (Del Merritt)
         - MoreCatalystBasics - Additional clarification about TTSite
-          (Del Merrit)
+          (Del Merritt)
         - Tutorial::Authorization - Corrects the ACL for "/books/delete"
                                   - Additional comments 
           (Del Merrit)

Modified: Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod
===================================================================
--- Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod	2009-02-06 10:24:53 UTC (rev 9231)
+++ Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod	2009-02-06 15:19:34 UTC (rev 9232)
@@ -152,7 +152,7 @@
             # Create a new book
             my $book = $c->model('DB::Books')->new_result({});
             # Save the form data for the book
-            $form->save_to_model($book);
+            $form->model->update($book);
             # Set a status message for the user
             $c->flash->{status_msg} = 'Book created';
             # Return to the books list
@@ -485,7 +485,7 @@
         # is shorthand for "$form->submitted && !$form->has_errors"
         if ($form->submitted_and_valid) {
             # Save the form data for the book
-            $form->save_to_model($book);
+            $form->model->update($book);
             # Set a status message for the user
             $c->flash->{status_msg} = 'Book edited';
             # Return to the books list
@@ -504,7 +504,7 @@
             # Add the authors to it
             $select->options(\@authors);
             # Populate the form with existing values from DB
-            $form->defaults_from_model($book);
+            $form->model->default_values($book);
         }
     
         # Set the template
@@ -533,14 +533,14 @@
 =item *
 
 If the form has been submitted and passes validation, we skip creating a 
-new book and just use C<$form-E<gt>save_to_model> to update the existing 
+new book and just use C<$form-E<gt>model-E<gt>update> to update the existing 
 book.
 
 =item *
 
 If the form is being displayed for the first time (or has failed 
 validation and it being redisplayed), we use
- C<$form-E<gt>default_from_model> to populate the form with data from the 
+ C<$form-E<gt>model-E<gt>default_values> to populate the form with data from the
 database.
 
 =back




More information about the Catalyst-commits mailing list