sub process {
my ($class, $r) = @_;
- $r->template( my $method = $r->action );
+ my $method = $r->action;
+ $r->{template} ||= $method; # Authentication may have done this for us
$r->objects([ $class->retrieve(shift @{$r->{args}}) ]);
- $class->$method($r);
+
+ # This allows the authentication mechanism to set the template
+ # without needing to define an action.
+ $class->$method($r) if $class->can($method);
}
sub display_columns {