Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to WebNano 0.007

  • Loading branch information...
commit e5aeba0263fcd8e4cc52470214e02d2229a0921a 1 parent aaae411
Zbigniew Lukasiak authored
View
4 lib/Nblog/Controller.pm
@@ -3,7 +3,9 @@ use warnings;
package Nblog::Controller;
-use base 'WebNano::DirController';
+use base 'WebNano::Controller';
+
+sub search_subcontrollers { 1 }
sub index_action {
my $self = shift;
View
4 lib/Nblog/Controller/Admin.pm
@@ -6,7 +6,9 @@ use Moose;
use MooseX::NonMoose;
use Plack::Response;
-extends 'WebNano::DirController';
+extends 'WebNano::Controller';
+
+sub search_subcontrollers { 1 }
around 'local_dispatch' => sub {
my $orig = shift;
View
5 lib/Nblog/Controller/Article.pm
@@ -13,14 +13,15 @@ use Nblog::Form::Comment;
has article => ( is => 'rw' );
around local_dispatch => sub {
- my ( $orig, $self, $title, @args ) = @_;
+ my ( $orig, $self, ) = @_;
+ my $title = shift @{ $self->path };
$title = uri_unescape( $title );
my $app = $self->app;
my $article = $app->schema->resultset('Article')
->search( { 'subject' => { like => $app->ravlog_url_to_query($title) } } )->first;
if( $article ){
$self->article( $article );
- $self->$orig( @args );
+ $self->$orig();
}
else{
my $res = Plack::Response->new(404);
Please sign in to comment.
Something went wrong with that request. Please try again.