On 16/01/13 21:58, Lukas Thiemeier wrote:

Assumed that you are using HTML::FormHandler::Model::DBIC, HTML::FormHandler will store the new (or updated) item in the forms "item" attribute.

You can try this:

 my $new_id = $c->stash->{form}->item->id;
 $c->res->redirect($c->uri_for($self->action_for('review'), [$new_id]));

This code should work, no matter if the item was updated or created. It will even work if the items id changes during the update process (which should rarely happen, but it will work if it happens)

That's exactly what I'm looking for, thank you! Is this in the documentation somewhere? I'm very happy to read documentation, when I know where to look for it.

All the best,

    Jacinta

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to