Commit | Line | Data |
b8faba69 |
1 | package Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll; |
2 | |
e739c9a2 |
3 | use Reaction::Types::DBIC 'ResultSet'; |
b8faba69 |
4 | use Reaction::Class; |
5 | use Reaction::InterfaceModel::Action; |
6 | |
7 | class DeleteAll is 'Reaction::InterfaceModel::Action', which { |
8 | |
d9a3266f |
9 | has '+target_model' => (isa => ResultSet); |
b8faba69 |
10 | |
11 | sub can_apply { 1 } |
12 | |
13 | implements do_apply => as { |
14 | my $self = shift; |
15 | return $self->target_model->delete_all; |
16 | }; |
17 | |
18 | }; |
19 | |
20 | 1; |
21 | |
22 | |
23 | =head1 NAME |
24 | |
25 | Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll |
26 | |
27 | =head1 DESCRIPTION |
28 | |
29 | Deletes every item in the target_model ResultSet |
30 | |
31 | =head2 target_model |
32 | |
33 | =head2 error_for_attribute |
34 | |
35 | =head2 sync_all |
36 | |
37 | =head1 AUTHORS |
38 | |
39 | See L<Reaction::Class> for authors. |
40 | |
41 | =head1 LICENSE |
42 | |
43 | See L<Reaction::Class> for the license. |
44 | |
45 | =cut |