[Catalyst-commits] r7514 -
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Tue Mar 18 01:00:43 GMT 2008
Author: karpet
Date: 2008-03-18 01:00:42 +0000 (Tue, 18 Mar 2008)
New Revision: 7514
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
Log:
switch to "model_meta" for more extensible ModelAdapter use
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2008-03-17 21:24:17 UTC (rev 7513)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2008-03-18 01:00:42 UTC (rev 7514)
@@ -30,7 +30,7 @@
default_template => 'path/to/foo/edit.tt',
model_name => 'Foo',
model_adapter => 'FooAdapter', # optional
- moniker => 'SomeTable', # optional
+ model_meta => { moniker => 'SomeTable' }, # optional
primary_key => 'id',
view_on_single_result => 0,
page_size => 50,
@@ -353,8 +353,13 @@
if ( $self->config->{model_adapter} ) {
Catalyst::Utils->ensure_class_loaded(
$self->config->{model_adapter} );
- $self->model_adapter( $self->config->{model_adapter}
- ->new( { model_name => $self->config->{model_name}, moniker => $self->config->{moniker} } ) );
+ $self->model_adapter(
+ $self->config->{model_adapter}->new(
+ { model_name => $self->config->{model_name},
+ model_meta => $self->config->{model_meta}
+ }
+ )
+ );
}
return $self;
}
More information about the Catalyst-commits
mailing list