[html-formfu] Changes for HTML-FormFu-Model-DBIC

Charlie Garrison garrison at zeta.org.au
Tue Mar 15 04:33:10 GMT 2011


Good afternoon,

I've made a couple of changes to HTML-FormFu-Model-DBIC and 
pushed them to my forked repo 
(https://github.com/cngarrison/HTML-FormFu-Model-DBIC). I'm 
posting here in case anyone is interested in the changes or has 
any comments.

I added `method_name` attribute in Constraint::DBIC::Unique, and 
support for `is_array` columns in Model::DBIC.

The first is a `method_name` attribute for 
Constraint::DBIC::Unique which allows calling a method on the 
resultset rather than searching on `column` (or `others`). This 
allows for more complex contraints than simply matching on 
columns. I'm using it to check usernames against a list of 
reserved (offensive) terms.

The second is a change to Model::DBIC to allow a column inflated 
as an array to be set via form submission (model->update). 
Columns with an `is_array` attribute will have an array rather 
than scalar assignment when updating the model $row. I've got a 
few columns which are comma separated values that I inflate to 
arrays, so I needed to assign form params as list rather than 
scalar values.


Charlie

-- 
    Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt




More information about the HTML-FormFu mailing list