Permalink
Browse files

searching posts: controller

  • Loading branch information...
1 parent e338ebe commit 7bc3ebfdb8044fba42e8f83d5c6142b5080792ec @garu committed Jun 14, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 tweetylicious.pl
View
@@ -112,6 +112,15 @@ package main;
get '/' => 'index';
+# search!
+get '/search' => sub {
+ my $self = shift;
+ my @items = split ' ', $self->param('query');
+
+ $self->stash( post_results => Model::search_posts(@items) );
+} => 'search';
+
+
# these two control a user registering
get '/join' => 'join';
post '/join' => sub {

0 comments on commit 7bc3ebf

Please sign in to comment.