aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ComponentUI
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ComponentUI')
-rw-r--r--lib/ComponentUI/Controller/TestModel/Bar.pm17
-rw-r--r--lib/ComponentUI/Controller/TestModel/Foo.pm12
2 files changed, 17 insertions, 12 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) = @_;
diff --git a/lib/ComponentUI/Controller/TestModel/Foo.pm b/lib/ComponentUI/Controller/TestModel/Foo.pm
index 917ea17..2fb994c 100644
--- a/lib/ComponentUI/Controller/TestModel/Foo.pm
+++ b/lib/ComponentUI/Controller/TestModel/Foo.pm
@@ -49,11 +49,11 @@ for my $action (qw/view create update/){
);
}
-sub _build_action_viewport_args {
- my $self = shift;
- my $args = $self->next::method(@_);
- $args->{list}{action_prototypes}{delete_all}{label} = 'Delete All Records';
- return $args;
-}
+# sub _build_action_viewport_args {
+# my $self = shift;
+# my $args = $self->next::method(@_);
+# # $args->{list}{action_prototypes}{delete_all}{label} = 'Delete All Records';
+# return $args;
+# }
1;