add a default 404 and 403 action, use the 404 on collection controller, make html...
[catagits/Reaction.git] / lib / Reaction / UI / Controller / Collection.pm
index 9606695..77a0005 100644 (file)
@@ -41,7 +41,7 @@ sub base :Action :CaptureArgs(0) {
 sub object :Chained('base') :PathPart('id') :CaptureArgs(1) {
   my ($self, $c, $key) = @_;
   my $object = $self->get_collection($c)->find($key);
-  confess "Object? what object?" unless $object; # should be a 404.
+  $c->detach("/error_404") unless $object;
   $c->stash(object => $object);
 }