diff options
Diffstat (limited to 'lib/ComponentUI/Controller/TestModel/Bar.pm')
-rw-r--r-- | lib/ComponentUI/Controller/TestModel/Bar.pm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/ComponentUI/Controller/TestModel/Bar.pm b/lib/ComponentUI/Controller/TestModel/Bar.pm index 4701fff..7ede58e 100644 --- a/lib/ComponentUI/Controller/TestModel/Bar.pm +++ b/lib/ComponentUI/Controller/TestModel/Bar.pm @@ -16,17 +16,22 @@ __PACKAGE__->config( layout => 'bar/collection', member_class => 'Reaction::UI::ViewPort::Object', Member => { layout => 'bar/member' } - } - } + }, + }, }, ); -sub get_collection { - my ($self, $c) = @_; - my $collection = $self->next::method($c); +around get_collection => sub { + my ($orig, $self, $c) = @_; + my $collection = $self->$orig($c); return $collection->where({}, { prefetch => 'foo' }); -} +}; + +1; + +__END__; +#put this aside for now sub create :Chained('base') { my $self = shift; my ($c) = @_; |