[html-formfu] Extremly simple patch to HTML::FormFu::Model::DBIC

Alex Povolotsky tarkhil at over.ru
Mon Apr 7 09:50:53 BST 2008


Zbigniew Lukasiak wrote:
> Hi Alex,
>
> First thanks for finding the bug and for sending us the patch.   I am
> sure that someone will apply it to the svn trunk at some time.  But if
> you wan to happen sooner than  please make it easy for the commiters
> and send us a patch in the form of svn diff from the current trunk.
> To do it you need to:
> - svn checkout the current trunk
>   
Done
> - add your test to the t directory
>   
.. partially..
> - check if it fails
>   
yes
> - make your changes
>   
done
> - check that the test does not fail any more
>   
yes
> - run svn diff > yourpatch.diff
>
>   
Index: lib/HTML/FormFu/Model/DBIC.pm
===================================================================
--- lib/HTML/FormFu/Model/DBIC.pm       (revision 990)
+++ lib/HTML/FormFu/Model/DBIC.pm       (working copy)
@@ -160,7 +160,7 @@
                
                 my $info = $dbic->result_source->relationship_info($name);
                 if ( !defined $info or $info->{attrs}{accessor} eq 
'multi' ) {
-                    my @defaults = $dbic->$name->get_column($col)->all;
+                    my @defaults = 
$dbic->$name->get_column('me.'.$col)->all;
                     $field->default( \@defaults );
                 }
             }


Here it is.

Alex.




More information about the HTML-FormFu mailing list