[Jifty-commit] r2784 - in jifty/branches/virtual-models: .
t/TestApp-DatabaseBackedModels/lib/TestApp/DatabaseBackedModels
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Feb 10 20:42:28 EST 2007
Author: jesse
Date: Sat Feb 10 20:42:28 2007
New Revision: 2784
Modified:
jifty/branches/virtual-models/ (props changed)
jifty/branches/virtual-models/lib/Jifty/Model/ModelClassColumn.pm
jifty/branches/virtual-models/t/TestApp-DatabaseBackedModels/lib/TestApp/DatabaseBackedModels/Bootstrap.pm
Log:
r21983 at hualien: jesse | 2007-02-10 20:42:21 -0500
*now only failing SOME of the model tests (label_text fallout). broke the rest dispatcher though. probably related to the previous commit
Modified: jifty/branches/virtual-models/lib/Jifty/Model/ModelClassColumn.pm
==============================================================================
--- jifty/branches/virtual-models/lib/Jifty/Model/ModelClassColumn.pm (original)
+++ jifty/branches/virtual-models/lib/Jifty/Model/ModelClassColumn.pm Sat Feb 10 20:42:28 2007
@@ -158,9 +158,8 @@
my $idref = shift;
$self->load_by_cols(id => $$idref);
$self->model_class->add_column($self);
-
my $ret = Jifty->handle->simple_query( $self->model_class->qualified_class->add_column_sql( $self->name ) );
- $ret or die "error updating a table: " . $ret->error_message;
+ $ret || $self->log->fatal( "error updating a table: " . $ret->error_message);
}
=head2 table
Modified: jifty/branches/virtual-models/t/TestApp-DatabaseBackedModels/lib/TestApp/DatabaseBackedModels/Bootstrap.pm
==============================================================================
--- jifty/branches/virtual-models/t/TestApp-DatabaseBackedModels/lib/TestApp/DatabaseBackedModels/Bootstrap.pm (original)
+++ jifty/branches/virtual-models/t/TestApp-DatabaseBackedModels/lib/TestApp/DatabaseBackedModels/Bootstrap.pm Sat Feb 10 20:42:28 2007
@@ -9,9 +9,10 @@
$modelclass->create( name => 'Widget');
my $col = Jifty::Model::ModelClassColumn->new(current_user => $user);
- $col->create( name => 'name', label => 'Name', storage_type => 'text', hints => 'This is the widget name', model_class => $modelclass);
+ $col->create( name => 'name', label_text => 'Name', storage_type => 'text', hints => 'This is the widget name', model_class => $modelclass);
+ return 1;
my $col2 = Jifty::Model::ModelClassColumn->new(current_user => $user);
- $col2->create( name => 'inventory', label => 'Inventory', storage_type => 'int', hints => 'How many do we have on hand?', model_class => $modelclass);
+ $col2->create( name => 'inventory', label_text => 'Inventory', storage_type => 'int', hints => 'How many do we have on hand?', model_class => $modelclass);
my $widget = TestApp::DatabaseBackedModels::Model::Widget->new(current_user => $user);
$widget->create(name => 'Weeble', inventory => 6);
More information about the Jifty-commit
mailing list