Fix bugs introduced previously
t0m [Sun, 7 Jun 2009 22:18:55 +0000 (23:18 +0100)]
lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm
lib/CatalystX/DynamicComponent/ModelToControllerReflector/Strategy/InterfaceRoles.pm

index 01883b5..c9f3877 100644 (file)
@@ -59,7 +59,7 @@ sub _reflect_model_to_controller {
     $strategy->new;
 
     my $model_methods = $model->meta->get_method_map;
-    foreach my $method_name ( $strategy->get_reflected_method_list($app, $model->meta) ) {
+    foreach my $method_name ( $strategy->get_reflected_method_list($app, $model_name) ) {
         # Note need to pass model name, as the method actually comes from
         # the underlying model class, not the Catalyst shim class we autogenerated.
         $controller_methods{$method_name} = 
index ff1965f..b98e5d2 100644 (file)
@@ -8,8 +8,7 @@ use namespace::autoclean;
 with 'CatalystX::DynamicComponent::ModelToControllerReflector::Strategy';
 
 sub get_reflected_method_list {;
-    my ($self, $app, $model_meta) = @_;
-    my $model_name = $model_meta->name;
+    my ($self, $app, $model_name) = @_;
     my $model_config = exists $app->config->{$model_name} ? $app->config->{$model_name} : {};
     my $my_config = exists $app->config->{'CatalystX::DynamicComponent::ModelToControllerReflector'}
         ? $app->config->{'CatalystX::DynamicComponent::ModelToControllerReflector'} : {};