X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2FBasicCRUD.pod;h=1f191b1c15ee8f92c3c9ec9a7c772f65955b528f;hp=2e688bb399cb5a7de7eb11e1724094eac6f42b37;hb=d04961970a25ec3dc831f89be5cd6e27fdec884a;hpb=056394af33148bedf19220d5f4934bf2615d84e8 diff --git a/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod b/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod index 2e688bb..1f191b1 100644 --- a/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod +++ b/lib/Catalyst/Manual/Tutorial/BasicCRUD.pod @@ -97,7 +97,7 @@ Edit C and enter the following method: # Call create() on the book model object. Pass the table # columns/field values we want to set as hash values - my $book = $c->model('MyAppDB::Books')->create({ + my $book = $c->model('DB::Books')->create({ title => $title, rating => $rating }); @@ -298,7 +298,7 @@ save the form information to the database: my $author_id = $c->request->params->{author_id} || '1'; # Create the book - my $book = $c->model('MyAppDB::Books')->create({ + my $book = $c->model('DB::Books')->create({ title => $title, rating => $rating, }); @@ -406,7 +406,7 @@ following method: my ($self, $c, $id) = @_; # Search for the book and then delete it - $c->model('MyAppDB::Books')->search({id => $id})->delete_all; + $c->model('DB::Books')->search({id => $id})->delete_all; # Set a status message to be displayed at the top of the view $c->stash->{status_msg} = "Book deleted."; @@ -479,7 +479,7 @@ C method to match: my ($self, $c, $id) = @_; # Search for the book and then delete it - $c->model('MyAppDB::Books')->search({id => $id})->delete_all; + $c->model('DB::Books')->search({id => $id})->delete_all; # Set a status message to be displayed at the top of the view $c->stash->{status_msg} = "Book deleted."; @@ -521,7 +521,7 @@ C method to match the following: my ($self, $c, $id) = @_; # Search for the book and then delete it - $c->model('MyAppDB::Books')->search({id => $id})->delete_all; + $c->model('DB::Books')->search({id => $id})->delete_all; # Redirect the user back to the list page with status msg as an arg $c->response->redirect($c->uri_for('/books/list',