[Catalyst-commits] r10076 -
Catalyst-Manual/5.70/branches/depluralise/lib/Catalyst/Manual/Tutorial
kiffin at dev.catalyst.perl.org
kiffin at dev.catalyst.perl.org
Mon May 11 09:10:47 GMT 2009
Author: kiffin
Date: 2009-05-11 09:10:47 +0000 (Mon, 11 May 2009)
New Revision: 10076
Modified:
Catalyst-Manual/5.70/branches/depluralise/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod
Log:
Last corrections, for now completed.
Modified: Catalyst-Manual/5.70/branches/depluralise/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod
===================================================================
--- Catalyst-Manual/5.70/branches/depluralise/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod 2009-05-11 02:00:56 UTC (rev 10075)
+++ Catalyst-Manual/5.70/branches/depluralise/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod 2009-05-11 09:10:47 UTC (rev 10076)
@@ -939,9 +939,9 @@
each book was added and when each book is updated:
$ sqlite3 myapp.db
- sqlite> ALTER TABLE books ADD created INTEGER;
- sqlite> ALTER TABLE books ADD updated INTEGER;
- sqlite> UPDATE books SET created = DATETIME('NOW'), updated = DATETIME('NOW');
+ sqlite> ALTER TABLE book ADD created INTEGER;
+ sqlite> ALTER TABLE book ADD updated INTEGER;
+ sqlite> UPDATE book SET created = DATETIME('NOW'), updated = DATETIME('NOW');
sqlite> SELECT * FROM book;
1|CCSP SNRS Exam Certification Guide|5|2009-03-08 16:26:35|2009-03-08 16:26:35
2|TCP/IP Illustrated, Volume 1|5|2009-03-08 16:26:35|2009-03-08 16:26:35
@@ -1014,7 +1014,7 @@
you will see that the new book we added has an appropriate date and
time entered for it (see the last line in the listing below):
- sqlite3 myapp.db "select * from books"
+ sqlite3 myapp.db "select * from book"
1|CCSP SNRS Exam Certification Guide|5|2009-03-08 16:26:35|2009-03-08 16:26:35
2|TCP/IP Illustrated, Volume 1|5|2009-03-08 16:26:35|2009-03-08 16:26:35
3|Internetworking with TCP/IP Vol.1|4|2009-03-08 16:26:35|2009-03-08 16:26:35
@@ -1245,7 +1245,7 @@
to an entire query, the Result Class construct is used to represent a
row. Therefore, we can add row-specific "helper methods" to our Result
Classes stored in C<lib/MyApp/Schema/Result/>. For example, open
-C<lib/MyApp/Schema/Result/Authors.pm> and add the following method (as
+C<lib/MyApp/Schema/Result/Author.pm> and add the following method (as
always, it must be above the closing "C<1;>"):
#
@@ -1263,14 +1263,14 @@
...
[% tt_authors = [ ];
- tt_authors.push(author.last_name) FOREACH author = book.authors %]
+ tt_authors.push(author.last_name) FOREACH author = book.author %]
...
to:
...
[% tt_authors = [ ];
- tt_authors.push(author.full_name) FOREACH author = book.authors %]
+ tt_authors.push(author.full_name) FOREACH author = book.author %]
...
(Only C<author.last_name> was changed to C<author.full_name> -- the
More information about the Catalyst-commits
mailing list