[Catalyst] CRUD for all tables in Catalyst 5
Alan Tam
Tam at SiuLung.com
Tue Sep 13 09:38:08 CEST 2005
Marcus Ramberg wrote:
> no. The CRUD controller is something else. It's a hybrid
> model/controller. The approach we're discussing here is an alternative
> to using the CRUD controller, which I personally find offensive. :) If
> you want CRUD like functionality, we recommend
> Catalyst::Helper::Controller::Scaffold these days.
I am a bit loss. I don't like Scaffold because it requires me to
generate some code _per table_. From what I am asking, I guess you know
I hope I can add some code to get CRUD work for all tables automagically.
I tried to replace Catalyst::Model::CDBI::CRUD with
Catalyst::Model::CDBI, then I get this:
|
Caught exception "MyApp::M::CDBI::Book did not override
Catalyst::Base::process at /usr/share/perl5/Catalyst/Engine.pm line 62"|
for this piece of code:
sub Book : Global {
my ($self, $c) = @_;
$c->form(optional => [ MyApp::M::CDBI::Book->columns ]);
$c->forward('MyApp::M::CDBI::Book');
}
Hence, I guess I am going moving away from the solution.
To my understanding $c->forward('MyApp::M::CDBI::Book') depends on the
sub{}'s in Catalyst::Model::CDBI::CRUD to work, isn't it?
--
Regards,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20050913/16762a71/attachment.htm
More information about the Catalyst
mailing list