Skip to content

Commit

Permalink
no need for a separate method
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 10, 2014
1 parent 5cc50d7 commit 48c53b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Mojolicious/Routes/Route.pm
Expand Up @@ -125,7 +125,8 @@ sub remove {
sub render {
my ($self, $values) = @_;
my $path = join '',
map { $_->pattern->render($values, $_->_children) } @{$self->_chain};
map { $_->pattern->render($values, !@{$_->children} && !$_->partial) }
@{$self->_chain};
return $path || '/';
}

Expand Down Expand Up @@ -191,8 +192,6 @@ sub _chain {
return \@chain;
}

sub _children { !@{$_[0]->children} && !$_[0]->partial }

sub _generate_route {
my ($self, $methods, @args) = @_;

Expand Down

0 comments on commit 48c53b7

Please sign in to comment.