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 | |
81393881 |
7 | use namespace::clean -except => [ qw(meta) ]; |
8 | extends 'Reaction::InterfaceModel::Action'; |
b8faba69 |
9 | |
b8faba69 |
10 | |
b8faba69 |
11 | |
81393881 |
12 | has '+target_model' => (isa => ResultSet); |
b8faba69 |
13 | |
81393881 |
14 | sub can_apply { 1 } |
15 | sub do_apply { |
16 | my $self = shift; |
17 | return $self->target_model->delete_all; |
b8faba69 |
18 | }; |
19 | |
81393881 |
20 | __PACKAGE__->meta->make_immutable; |
21 | |
22 | |
b8faba69 |
23 | 1; |
24 | |
25 | |
26 | =head1 NAME |
27 | |
28 | Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll |
29 | |
30 | =head1 DESCRIPTION |
31 | |
32 | Deletes every item in the target_model ResultSet |
33 | |
34 | =head2 target_model |
35 | |
36 | =head2 error_for_attribute |
37 | |
38 | =head2 sync_all |
39 | |
40 | =head1 AUTHORS |
41 | |
42 | See L<Reaction::Class> for authors. |
43 | |
44 | =head1 LICENSE |
45 | |
46 | See L<Reaction::Class> for the license. |
47 | |
48 | =cut |