[Jifty-commit] r5893 - jifty/trunk/lib/Jifty/Action/Record
Jifty commits
jifty-commit at lists.jifty.org
Sun Sep 28 10:40:32 EDT 2008
Author: clkao
Date: Sun Sep 28 10:40:31 2008
New Revision: 5893
Modified:
jifty/trunk/lib/Jifty/Action/Record/Bulk.pm
Log:
actually use individual action to perform bulk action.
Modified: jifty/trunk/lib/Jifty/Action/Record/Bulk.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record/Bulk.pm (original)
+++ jifty/trunk/lib/Jifty/Action/Record/Bulk.pm Sun Sep 28 10:40:31 2008
@@ -67,11 +67,20 @@
sub perform_action {
my ($self, $action_class, $ids) = @_;
+ $self->result->content('detailed_messages', {})
+ unless $self->result->content('detailed_messages');
+
for (@$ids) {
my $record = $self->record_class->new;
$record->load($_);
- $self->record( $record );
- $action_class->can('take_action')->($self);
+
+ my $action = $action_class->new(
+ moniker => join('-', $self->moniker, $action_class, $_),
+ record => $record,
+ arguments => $self->argument_values );
+
+ $action->take_action;
+ $self->result->content('detailed_messages')->{ $action->moniker } = $action->result->message;
}
# allow bulk action to define if they allow individual action to fail
}
More information about the Jifty-commit
mailing list