[html-formfu] FormFu::Model subclassing

Nick Spacek nick.spacek at gmail.com
Mon Aug 17 14:12:32 GMT 2009


>
> update and create are the same method in Model::HashRef. Both accept no
> arguments but return a hashref. So your example should look something like
> this:
>
>
>  sub update :Chained('root') Args(0) FormConfig {
>>    my ( $self, $c ) =3D @_;
>>
>>    my $form =3D $c->stash->{ form };
>>    $form->default_model( 'HashRef' );
>>
>>    if($form->submitted_and_valid) {
>>        my $f =3D $c->stash->{ form }->model->update;
>>    }
>> }
>
>
I tried this as well, and Dumper-ed the result of the update. It comes back
with an empty title field! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20090817/9b=
03f42a/attachment.htm


More information about the HTML-FormFu mailing list