]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC.pm
This gives us the edit method. (Which also creates new things)
[maypole.git] / lib / Apache / MVC.pm
index 7869cfa45125630b03ed96f7b5d58ace40a7d501..25a8adb0c6dc9d47259624b433d5c4a3fa20e43a 100644 (file)
@@ -51,6 +51,8 @@ sub init {
     for my $subclass (@{$config->{classes}}) {
         no strict 'refs';
         push @{$subclass."::ISA"}, $class->config->{model};
+        $config->{model}->adopt($subclass)
+           if $config->{model}->can("adopt");
     }
     $class->view_object($class->config->{view}->new);
     $class->init_done(1);
@@ -97,7 +99,7 @@ sub parse_location {
     $self->{action} = shift @pi;
     $self->{args} = \@pi;
 
-    $self->{params} = $self->{ar}->content;
+    $self->{params} = { $self->{ar}->content };
 }
 
 sub is_applicable {