X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2FMaypole%2FView%2FBase.pm;h=5a99580e514f01a0c914f677a2b96a8028cfc47a;hb=1c8db728a3fb5adb4f0ea876ea1316457700edf8;hp=a2718c47e53d34f51aba11ccbc0bd99e618d2823;hpb=3ed98309a0852fc198f9e4d0e6f70c5510c8282f;p=maypole.git diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index a2718c4..5a99580 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -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;