]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Model/Base.pm
There goes 1.4.
[maypole.git] / lib / Maypole / Model / Base.pm
index 30dacfe60015ad8227a4370fb1d5dff180c38242..6e60aea7f9c3f4505b93263eaa31fcef4dc240d2 100644 (file)
@@ -12,12 +12,13 @@ sub process {
     return if $r->{template}; # Authentication has set this, we're done.
 
     $r->{template} = $method;
+    $r->objects([]);
     my $obj = $class->retrieve( $r->{args}->[0] );
     if ($obj) {
         $r->objects([ $obj ]);
         shift @{$r->{args}};
     }
-    $class->$method($r);
+    $class->$method($r, $obj, @{$r->{args}});
 }
 
 sub display_columns { 
@@ -124,7 +125,7 @@ Return a hash mapping column names with human-readable equivalents.
 
 sub column_names { my $class = shift; map { 
         my $col = $_;
-        $col =~ s/_+(\w)?/ \U\1/g;
+        $col =~ s/_+(\w)?/ \U$1/g;
         $_ => ucfirst $col } $class->columns }
 
 =head2 description