]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/TT.pm
Add in "table" to the class metadata.
[maypole.git] / lib / Maypole / View / TT.pm
index 4bd7c0ebb836af2acd0817aba039b1da8b58b7e1..a1960bacca977100da054681f082ba365bde05a0 100644 (file)
@@ -1,5 +1,4 @@
 package Maypole::View::TT;
-use Apache::Constants;
 use Lingua::EN::Inflect;
 use Template;
 use File::Spec;
@@ -34,6 +33,7 @@ sub _args {
     if ($class) { 
         $args{classmetadata} = {
             name => $class,
+            table => $class->table,
             columns => [ $class->display_columns ],
             colnames => { $class->column_names },
             related_accessors => [ $class->related($r) ],
@@ -71,7 +71,7 @@ sub process {
 sub error {
     my ($self, $r, $error) = @_;
     warn $error;
-    if ($error =~ /not found$/) { return DECLINED }
+    if ($error =~ /not found$/) { return -1 }
     $r->{content_type} = "text/plain";
     $r->{output} = $error;
     $r->send_output;