[html-formfu] refactoring defaults_from_model (DBIC)

Brian Cassidy brian.cassidy at nald.ca
Mon Jan 14 12:33:27 GMT 2008


Carl Franks wrote:
> On 12/01/2008, Zbigniew Lukasiak <zzbbyy at gmail.com> wrote:
>>
>> I've changed defaults_from_model. Instead of scanning the db fields of
>> the given row and then matching them against form fields - I made it
>> walk through the form fields and match them against the db fields.

(Note, I haven't looked at your code yet)

Depending on how you do this it could bring back the "delete" bug, 
where-in a form element named "delete" would actually execute the 
"delete" method on the dbic object, thereby removing the row from the 
database.

You're probably well-aware of the issue, but I just want to state it to 
the list to be safe. :)

> It looks good.
> I'm currently working on some more test files - to make absolutely
> sure everything's covered - so hopefully it can be committed very
> soon.

Hopefully there's a test for the above issue.

-Brian



More information about the HTML-FormFu mailing list