1 package ComponentUI::Controller::TestModel::Bar;
3 use base 'Reaction::UI::Controller::Collection::CRUD';
7 model_name => 'TestModel',
8 collection_name => 'Bar',
10 base => { Chained => '/base', PathPart => 'testmodel/bar' },
13 enable_order_by => [qw/name foo published_at/],
14 coerce_order_by => { foo => ['foo.last_name', 'foo.first_name'] },
22 my $collection = $self->next::method($c);
23 return $collection->where({}, { prefetch => 'foo' });
26 sub create :Chained('base') {
29 my $action_vp = $self->next::method(@_);
30 my $self_uri = $c->uri_for($self->action_for('create'));
31 $action_vp->action($self_uri);