[Jifty-commit] r1768 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Aug 6 15:16:39 EDT 2006
Author: jesse
Date: Sun Aug 6 15:16:38 2006
New Revision: 1768
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Record.pm
Log:
r15004 at pinglin: jesse | 2006-08-06 14:56:38 -0400
* canonicalization wasn't being properly run on models before validation
Modified: jifty/trunk/lib/Jifty/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Record.pm (original)
+++ jifty/trunk/lib/Jifty/Record.pm Sun Aug 6 15:16:38 2006
@@ -63,6 +63,12 @@
foreach my $key ( keys %attribs ) {
my $attr = $attribs{$key};
+ my $method = "canonicalize_$key";
+ my $func = $self->can($method) or next;
+ $attribs{$key} = $self->$func( $attr);
+ }
+ foreach my $key ( keys %attribs ) {
+ my $attr = $attribs{$key};
my $method = "validate_$key";
my $func = $self->can($method) or next;
my ( $val, $msg ) = $func->($self, $attr);
More information about the Jifty-commit
mailing list