]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/Base.pm
tested and it seems to work
[maypole.git] / lib / Maypole / View / Base.pm
index a2718c47e53d34f51aba11ccbc0bd99e618d2823..5a99580e514f01a0c914f677a2b96a8028cfc47a 100644 (file)
@@ -19,7 +19,7 @@ sub paths {
        push(@output,
             (
               $r->model_class
-             && File::Spec->catdir( $path, $r->model_class->moniker )
+             && File::Spec->catdir( $path, $r->model_class->table )
              )
             );
        push(@output, File::Spec->catdir( $path, "custom" ));
@@ -41,10 +41,11 @@ sub vars {
         request => $r,
         objects => $r->objects,
         base    => $base,
-        config  => $r->config
-
-          # ...
+        config  => $r->config,
     );
+
+    $args{object} = $r->object if ($r->can('object'));
+
     if ($class) {
         my $classmeta = $r->template_args->{classmetadata} ||= {};
         $classmeta->{name}              ||= $class;