Conform to the column name change...

of book.name to book.title that I made in dbix-tutorial.
This commit is contained in:
barnold 2022-09-18 11:01:34 +01:00
parent 8dcdb9fb10
commit e90a76ba61
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ sub get_page ($self, $page_number = 1) {
my $rs = $self->schema->resultset('Book')->search_rs(
undef,
{ prefetch => [ "author" ],
order_by => [ "me.name " ],
order_by => [ "me.title " ],
page => $page_number,
rows => 10,
},

View File

@ -8,11 +8,11 @@ Book count is <%= $book_count %>.
<div>
<table>
<tr>
<th>Book</th><th>Author</th>
<th>Title</th><th>Author</th>
</tr>
% for my $book ($book_page->all) {
<tr>
<td><%= $book->name %></td>
<td><%= $book->title %></td>
<td><%= $book->author->name %>
</td></tr>
% }