my ( $c, $name, @args ) = @_;
if (ref $c && !$name) {
+ my $current_instance = $c->stash->{current_model_instance};
return $current_instance
- if my $current_instance = $c->stash->{current_model_instance};
+ if $current_instance;
$name = $c->stash->{current_model};
}
my ( $c, $name, @args ) = @_;
if (ref $c && !$name) {
+ my $current_instance = $c->stash->{current_view_instance};
return $current_instance
- if my $current_instance = $c->stash->{current_view_instance};
+ if $current_instance;
$name = $c->stash->{current_view};
}