Skip to content

Commit e5c9d1d

Browse files
committed
Redirect to index after edit
Update the generated edit action. This now redirects to the index instead of the edit form. Fixes #257
1 parent 2664394 commit e5c9d1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Resources/skeleton/crud/controller/Controller.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function edit(Request $request, <?= $entity_class_name ?> $<?= $entity_va
7878
if ($form->isSubmitted() && $form->isValid()) {
7979
$this->getDoctrine()->getManager()->flush();
8080

81-
return $this->redirectToRoute('<?= $route_name ?>_edit', ['<?= $entity_identifier ?>' => $<?= $entity_var_singular ?>->get<?= ucfirst($entity_identifier) ?>()]);
81+
return $this->redirectToRoute('<?= $route_name ?>_index', ['<?= $entity_identifier ?>' => $<?= $entity_var_singular ?>->get<?= ucfirst($entity_identifier) ?>()]);
8282
}
8383

8484
return $this->render('<?= $templates_path ?>/edit.html.twig', [

0 commit comments

Comments
 (0)