X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F03_MoreCatalystBasics.pod;h=3b95f04f75fbb6771f1abb3f6e9bdf56fbc2ab60;hb=78b0b5f65d042e2fc7100951359c325621746ec8;hp=1f66bac8a15f8fbe3538273710da2e4c9ffff30a;hpb=658b8c291ca9cfeb68c0775805d250467efb1e22;p=catagits%2FCatalyst-Manual.git diff --git a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod index 1f66bac..3b95f04 100644 --- a/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod +++ b/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod @@ -308,7 +308,7 @@ and add the following method to the controller: # Set the TT template to use. You will almost always want to do this # in your action methods (action methods respond to user input in # your controllers). - $c->stash->{template} = 'books/list.tt2'; + $c->stash(template => 'books/list.tt2'); } B: See Appendix 1 for tips on removing the leading spaces when @@ -567,6 +567,7 @@ SQLite (L), a popular database that is lightweight and easy to use. Be sure to get at least version 3. Open C in your editor and enter: + PRAGMA foreign_keys = ON; -- -- Create a very simple database to hold book and author information -- @@ -651,7 +652,7 @@ required if you do a single SQL statement on the command line). Use your OS command prompt. Please note that here we have chosen to use 'singular' table names. This is -because the default inflection code for older versions +because the default inflection code for older versions of L does NOT handle plurals. There has been much philosophical discussion on whether table names should be plural or singular. There is no one correct answer, as long as one makes a choice and remains @@ -838,7 +839,7 @@ and delete the next 2 lines): # Set the TT template to use. You will almost always want to do this # in your action methods (action methods respond to user input in # your controllers). - $c->stash->{template} = 'books/list.tt2'; + $c->stash(template => 'books/list.tt2'); } B: You may see the C<$c-Emodel('DB::Book')> un-commented @@ -1429,7 +1430,7 @@ has changed): # Set the TT template to use. You will almost always want to do this # in your action methods (actions methods respond to user input in # your controllers). - #$c->stash->{template} = 'books/list.tt2'; + #$c->stash(template => 'books/list.tt2'); }