[Catalyst-commits] r7914 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX/CRUD
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Thu Jun 12 18:01:18 BST 2008
Author: karpet
Date: 2008-06-12 18:01:17 +0100 (Thu, 12 Jun 2008)
New Revision: 7914
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
Log:
prep for 0.27 release
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-06-12 16:59:06 UTC (rev 7913)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-06-12 17:01:17 UTC (rev 7914)
@@ -119,7 +119,7 @@
* added support for "x-tunneled-method" param to REST controller in addition to "_http_method".
This is for compat with Catalyst::Request::REST::ForBrowsers.
-0.27 xxx
+0.27 12 June 2008
* fix Controller->rm() to check for model_adapter() and call its delete() method as advertised.
* check for length($oid) instead of defined($oid) in REST->default
* added CatalystX::CRUD::Results class
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2008-06-12 16:59:06 UTC (rev 7913)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2008-06-12 17:01:17 UTC (rev 7914)
@@ -609,7 +609,7 @@
# stash the form so it can be re-displayed
# subclasses must stick-ify it in their own way.
- $c->stash->{form} ||= $self->form;
+ $c->stash->{form} ||= $self->form($c);
# if we have no input, just return for initial search
if ( !@arg && !$c->req->param && $c->action->name eq 'search' ) {
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2008-06-12 16:59:06 UTC (rev 7913)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2008-06-12 17:01:17 UTC (rev 7914)
@@ -16,7 +16,7 @@
=head1 SYNOPSIS
# in .tt file
- Your search returned [% results.count %] hits.
+ Your search returned [% results.count %] total hits.
Your query was [% results.query %].
You are on page [% results.pager.current_page %].
[% FOREACH r IN results.results %]
@@ -35,7 +35,7 @@
=head2 count
-Returns number of results.
+Returns total number of results.
=head2 pager
@@ -47,7 +47,7 @@
=head2 results
-Returns array ref of found objects.
+Returns array ref of current found objects.
=cut
@@ -61,6 +61,8 @@
sub next {
my $self = shift;
+ return unless defined $self->results;
+
if ( ref( $self->results ) eq 'ARRAY' ) {
return shift @{ $self->{results} };
}
More information about the Catalyst-commits
mailing list