diff options
Diffstat (limited to 'lib/ComponentUI/Controller/TestModel/Foo.pm')
-rw-r--r-- | lib/ComponentUI/Controller/TestModel/Foo.pm | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/ComponentUI/Controller/TestModel/Foo.pm b/lib/ComponentUI/Controller/TestModel/Foo.pm index d636c6c..50dccde 100644 --- a/lib/ComponentUI/Controller/TestModel/Foo.pm +++ b/lib/ComponentUI/Controller/TestModel/Foo.pm @@ -1,7 +1,7 @@ package ComponentUI::Controller::TestModel::Foo; -use base 'Reaction::UI::Controller::Collection::CRUD'; -use Reaction::Class; +use Moose; +BEGIN { extends 'Reaction::UI::Controller::Collection::CRUD'; } use aliased 'Reaction::UI::ViewPort::SearchableListViewContainer'; use aliased 'ComponentUI::TestModel::Foo::SearchSpec'; @@ -56,16 +56,22 @@ for my $action (qw/view create update/){ override _build_action_viewport_map => sub { my $map = super(); $map->{list} = SearchableListViewContainer; - $map; + return $map; }; -sub _build_action_viewport_args { - my $self = shift; - my $args = $self->next::method(@_); - $args->{list}{action_prototypes}{delete_all}{label} = 'Delete All Records'; +override _build_action_viewport_args => sub { + my $args = super(); $args->{list}{spec_class} = SearchSpec; $args->{list}{action_class} = Update; return $args; +}; + +sub object : Chained('base') PathPart('id') CaptureArgs(1) { + my ($self, $c, $object) = @_; + $self->next::method($c, $object); + # just as failing use case } 1; + +__END__; |