]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/Base.pm
removed Maypole::Model->description,
[maypole.git] / lib / Maypole / View / Base.pm
index f687309d5057f4e66e8b3e2608c17be904bc3417..312d38ba24aeeb3f3e70809776a788433751a5f2 100644 (file)
@@ -35,9 +35,8 @@ sub vars {
           # ...
     );
     if ($class) {
-        my $classmeta = $args{classmetadata} ||= {};
+        my $classmeta = $r->template_args->{classmetadata} ||= {};
         $classmeta->{name}              ||= $class;
-        $classmeta->{description}       ||= $class->description;
         $classmeta->{table}             ||= $class->table;
         $classmeta->{columns}           ||= [ $class->display_columns ];
         $classmeta->{list_columns}      ||= [ $class->list_columns ];
@@ -57,9 +56,7 @@ sub vars {
     }
 
     # Overrides
-    local $r->{template_args} = $r->{template_args};
-    delete $r->{template_args}{classmetadata}; # already overrides
-    %args = ( %args, %{ $r->{template_args} || {} } );
+    %args = ( %args, %{ $r->template_args || {} } );
     %args;
 }
 
@@ -151,8 +148,8 @@ during view initialization.
 
 =head2 paths
 
-Returns search paths for templates. the default method returns factory, custom
-and E<lt>tablenameE<gt> under the configured template root.
+Returns search paths for templates. the default method returns folders for the
+model class's C<moniker>, factory, custom under the configured template root.
 
 =head2 vars