[jifty-devel] Re: [Jifty-commit] r1320 - in jifty/trunk: lib/Jifty/Action/Record

Sean E. Millichamp sean at enertronllc.com
Tue Jun 20 18:57:09 EDT 2006


On Mon, 2006-06-19 at 18:15 -0400, jifty-commit at lists.jifty.org wrote:

>  r12761 at pinglin:  jesse | 2006-06-19 12:15:38 -0400
>  * Backed out seanmil's "Skip nonexistent columns" change, as it breaks 
>    model classes that have custom (non-database-backed) arguments.

Jesse,

I don't disagree with this, but what do you propose should be done in
the case of fields which render_as Password.  Jifty::Action::Record
automatically creates a fieldname_confirm field which will cause an
unsuspecting Model to choke.

I think that to have Jifty::Action::Record create the fieldname_confirm
field and then to have Jifty::Action::Record::Create ignore it so the
result throws up a Jifty::DBI error violates least surprise and would be
frustrating for a new Jifty user.

Maybe this is something that just needs to be clearly documented in
Jifty::Action::Record or Jifty::Record?  If you use a render_as
'Password' and use Jifty::Action::Record then you must either override
create or have a before_create to filter the fieldname_confirm out
before it gets passed to Jifty::DBI::Record's create?

Sean

-- 
 Sean E. Millichamp, Enertron LLC, 586-757-1200 x102




More information about the jifty-devel mailing list