Skip to content
Browse files

Updated for WebNano 0.007

  • Loading branch information...
1 parent 8a20ad8 commit c468b699bbf86d5a2a23103dbc7aafdac12a724a Zbigniew Lukasiak committed May 19, 2012
Showing with 13 additions and 8 deletions.
  1. +4 −1 Changes
  2. +2 −2 dist.ini
  3. +4 −4 lib/WebNano/Controller/CRUD.pm
  4. +3 −1 t/lib/MyApp/Controller.pm
View
5 Changes
@@ -1,5 +1,8 @@
Revision history for WebNano::Controller::CRUD
-{{$NEXT}}
+0.005 2011-09-27
fixed multi selections
+{{$NEXT}}
+ updated for WebNano 0.007
+
View
4 dist.ini
@@ -3,14 +3,14 @@ author = Zbigniew Lukasiak <zby@cpan.org>
license = Artistic_2_0
copyright_holder = Zbigniew Lukasiak <zby@cpan.org>
copyright_year = 2010
-version = 0.005
+version = 0.006
[@Basic]
[Prereqs]
DBIx::Class = 0
HTML::FormHandler::Model::DBIC = 0
HTML::FormHandler::Moose = 0
-WebNano = 5
+WebNano = 0.007
WebNano::Renderer::TT = 0
Config::General = 0
[AutoPrereqs]
View
8 lib/WebNano/Controller/CRUD.pm
@@ -50,7 +50,7 @@ sub columns {
sub _get_parts {
my $self = shift;
- my @args = @_;
+ my @args = @{ $self->path };
my @pks = @{ $self->primary_columns };
my @ids;
for my $i ( 0 .. $#pks ){
@@ -72,8 +72,8 @@ sub _get_parts {
}
around 'local_dispatch' => sub {
- my( $orig, $self, @args ) = @_;
- if( my $parsed = $self->_get_parts( @args ) ){
+ my( $orig, $self ) = @_;
+ if( my $parsed = $self->_get_parts() ){
my $rs = $self->app->schema->resultset( $self->rs_name );
my $record = $rs->find( @{ $parsed->{ids} } );
if( ! $record ) {
@@ -85,7 +85,7 @@ around 'local_dispatch' => sub {
my $method = $parsed->{method};
return $self->$method( $record, @{ $parsed->{args} } );
}
- return $self->$orig( @args );
+ return $self->$orig();
};
sub index_action { shift->list_action( @_ ) }
View
4 t/lib/MyApp/Controller.pm
@@ -2,7 +2,9 @@ package MyApp::Controller;
use Moose;
use MooseX::NonMoose;
-extends 'WebNano::DirController';
+extends 'WebNano::Controller';
+
+sub search_subcontrollers { 1 }
sub index_action {
my $self = shift;

0 comments on commit c468b69

Please sign in to comment.
Something went wrong with that request. Please try again.