Created
June 25, 2012 15:59
-
-
Save diegok/2989425 to your computer and use it in GitHub Desktop.
Example usage of render_not_found().
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get '/post/:slug' => sub { | |
my $self = shift; | |
my $post = $self->db->posts->find_by_slug( $self->stash('slug') ); | |
return $self->render_not_found unless $post; | |
# ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment