diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-12-15 21:06:24 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-12-15 21:06:24 +0000 |
commit | aff8f204bc4c7651c9b801a0bee12605b88a706a (patch) | |
tree | e80625ba56510628730b69e5efca1cbf92df4d45 /lib/ComponentUI/Controller/TestModel/Bar.pm | |
parent | a722f3e3e226a7319f69722de01c06792b3cf2c3 (diff) | |
parent | 931cbc8d6673ec352b369ae2f70f01ff96b4f507 (diff) | |
download | reaction-aff8f204bc4c7651c9b801a0bee12605b88a706a.tar.gz reaction-aff8f204bc4c7651c9b801a0bee12605b88a706a.zip |
r31501@martha (orig r1230): groditi | 2009-09-11 09:36:16 -0400
initial refactor of CRUD controller actions as roles
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) = @_; |