[Catalyst] HTML::Prototype - GOOD CODE
Will Smith
willbelair at yahoo.com
Fri Nov 4 00:47:06 CET 2005
thanks for all.
This is how it's done, thanks to Michael Reece
sub suggest : Local {
my ( $self, $c ) = @_;
my $complete_me = $c->req->params->{complete_me};
my @suggestions;
if ( $complete_me ) {
my @s = MyApp::CDBI::Story->search_like(headline => "$
{complete_me}%");
push @suggestions, $_->headline foreach @s;
}
$c->res->output( $c->prototype->auto_complete_result
( \@suggestions ) );
}
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051103/3e74a489/attachment.htm
More information about the Catalyst
mailing list