aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-02-02 19:20:40 +0000
committergroditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2008-02-02 19:20:40 +0000
commitb68d6a353206242782e4444b7d6a6f6c20cbff6e (patch)
treed49a2233b5b53316b2f6f41a3d5dbcfb1d81321c
parentaee256be57519750d0e0a41a759069c4c1192409 (diff)
downloadreaction-b68d6a353206242782e4444b7d6a6f6c20cbff6e.tar.gz
reaction-b68d6a353206242782e4444b7d6a6f6c20cbff6e.zip
oops forward takes args as an arrayref and i forgot to remove that
-rw-r--r--Makefile.PL1
-rw-r--r--lib/Reaction/UI/Controller/Collection.pm4
-rw-r--r--lib/Reaction/UI/Controller/Collection/CRUD.pm6
3 files changed, 6 insertions, 5 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 4ed1acd..167a9fa 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -32,6 +32,7 @@ requires 'Text::CSV_XS';
requires 'Devel::Declare' => '0.001006';
requires 'MooseX::Types' => '0.04';
requires 'Scalar::Util';
+requires 'File::ShareDir';
install_share;
diff --git a/lib/Reaction/UI/Controller/Collection.pm b/lib/Reaction/UI/Controller/Collection.pm
index bdc43a6..6b76e54 100644
--- a/lib/Reaction/UI/Controller/Collection.pm
+++ b/lib/Reaction/UI/Controller/Collection.pm
@@ -47,12 +47,12 @@ sub object :Chained('base') :PathPart('id') :CaptureArgs(1) {
sub list :Chained('base') :PathPart('') :Args(0) {
my ($self, $c) = @_;
- $self->basic_page($c, [{ collection => $self->get_collection($c) }]);
+ $self->basic_page($c, { collection => $self->get_collection($c) });
}
sub view :Chained('object') :Args(0) {
my ($self, $c) = @_;
- $self->basic_page($c, [{ model => $c->stash->{object} }]);
+ $self->basic_page($c, { model => $c->stash->{object} });
}
sub basic_page {
diff --git a/lib/Reaction/UI/Controller/Collection/CRUD.pm b/lib/Reaction/UI/Controller/Collection/CRUD.pm
index 3c8c8dd..09e6e0c 100644
--- a/lib/Reaction/UI/Controller/Collection/CRUD.pm
+++ b/lib/Reaction/UI/Controller/Collection/CRUD.pm
@@ -61,7 +61,7 @@ sub create :Chained('base') :PathPart('create') :Args(0) {
sub delete_all :Chained('base') :PathPart('delete_all') :Args(0) {
my ($self, $c) = @_;
- $self->basic_model_action( $c, [{ next_action => 'list'}]);
+ $self->basic_model_action( $c, { next_action => 'list'});
}
sub after_create_callback {
@@ -76,7 +76,7 @@ sub update :Chained('object') :Args(0) {
my @cap = @{$c->req->captures};
pop(@cap); # object id
my $vp_args = { next_action => [ $self, 'redirect_to', 'list', \@cap ]};
- $self->basic_model_action( $c, [$vp_args]);
+ $self->basic_model_action( $c, $vp_args);
}
sub delete :Chained('object') :Args(0) {
@@ -85,7 +85,7 @@ sub delete :Chained('object') :Args(0) {
my @cap = @{$c->req->captures};
pop(@cap); # object id
my $vp_args = { next_action => [ $self, 'redirect_to', 'list', \@cap ]};
- $self->basic_model_action( $c, [$vp_args]);
+ $self->basic_model_action( $c, $vp_args);
}
sub basic_model_action {