Editing, finally!
- Using REST again. First start with base:
sub create : Chained('wiki') PathPart Args(0) ActionClass('REST'){
my ($self, $c) = @_;
unless($c->user_exists){
$c->session->{login_from} = $c->req->uri;
$c->flash->{message} = 'You must log in to edit.';
$c->res->redirect($c->uri_for('/login'));
$c->detach;
}
}
- If no user, redirect them to login.
- Login remembers where they came from.