copy 2 lines from chapter 5 to chapter 6 code. RT 71178
sockmonk [Tue, 20 Mar 2012 00:41:34 +0000 (20:41 -0400)]
lib/Catalyst/Manual/Tutorial/06_Authorization.pod

index 20b38f3..5ef7ac4 100644 (file)
@@ -303,6 +303,9 @@ match the following code:
         $c->detach('/error_noperms')
             unless $c->stash->{object}->delete_allowed_by($c->user->get_object);
     
+        # Saved the PK id for status_msg below
+        my $id = $c->stash->{object}->id;
+    
         # Use the book object saved by 'object' and delete it along
         # with related 'book_authors' entries
         $c->stash->{object}->delete;