]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Root.pm
Added model and renamed submodule
[ndwebbie.git] / lib / NDWeb / Controller / Root.pm
index 4657f7ad8bb0d0cc6cd0b9dd77adcb20339523b4..0a41059c7bc3e7188202c6caf050c12cdb61d464 100644 (file)
@@ -29,17 +29,26 @@ NDWeb::Controller::Root - Root Controller for NDWeb
 sub index : Local Path Args(0) {
     my ( $self, $c ) = @_;
 
-    # Hello World
-       #$c->response->body( $c->welcome_message );
+       $c->stash(abc => $c->req->base);
 }
 
 sub default : Path {
     my ( $self, $c ) = @_;
-    $c->response->body( 'Page not found' );
+       $c->res->body( 'Page not found' );
     $c->response->status(404);
     
 }
 
+sub auto : Private {
+       my ($self, $c) = @_;
+
+       my $dbh = $c ->model;
+       $c->stash(dbh => $dbh);
+
+       $c->stash->{game}->{tick} = $dbh->selectrow_array('SELECT tick()',undef);
+
+}
+
 =head2 end
 
 Attempt to render a view, if needed.