Update the module because the documentation had errors.
$form->create is not correct. It should be $form->model->create.
I don't remember if the change was submitted to cpan or if I got the new
code from the SVN repository, but try from the CPAN first.
Octavian
----- Original Message -----
From: "Dermot" <paik...@googlemail.com>
To: "HTML Form Creation,Rendering and Validation Framework"
<html-formfu@lists.scsys.co.uk>
Sent: Tuesday, February 03, 2009 6:49 PM
Subject: [html-formfu] HTML::FormFu::Model::DBIC
Hi,
I am a bit confused about how to `use HTML::FormFu::Model::DBIC;` My
current implementation is not picking up the correct class methods.
I have:
use parent 'Catalyst::Controller::HTML::FormFu';
use HTML::FormFu::Model::DBIC;
sub add: Local {
...
...
my $user = $c->model('DB::Users')->new_result({});
# $form->save_to_model($user); # This works
$form->create($user); # This errors with
"...::Controller::Users->add "Can't locate object method "create" via
package "HTML::FormFu"
my config file has:
<Controller::HTML::FormFu>
<model_stash>
schema DB
# schema = DB
</model_stash>
</Controller::HTML::FormFu>
Sorry if I'm being dim. Can anyone tell me where I am going wrong please?
Dp.
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu