Skip to content

Commit 3248ee0

Browse files
authored
Removing warning not needed anymore and minor cs
1 parent a3ff4ac commit 3248ee0

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/Turbo/README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,9 @@ automatically:
102102
public function newProduct(Request $request): Response
103103
{
104104
return $this->handleForm(
105-
$this->createForm(ProductFormType::class, null,
106-
[
105+
$this->createForm(ProductFormType::class, null, [
107106
'action' => $this->generateUrl('product_new'),
108-
]
109-
),
107+
]),
110108
$request,
111109
function (FormInterface $form) {
112110
// save...
@@ -180,17 +178,6 @@ $builder
180178
]
181179
]);
182180
```
183-
> **NOTE Turbo ^7.0.0-beta.5:**
184-
> If Turbo ^7.0.0-beta.5 or lower (may be still valid with future version), there is a bug with turbo-frame and form submit. F.e., a link to add a product will work the 1st time, the frame will have the new product form, on submit, the frame will be updated using the products listing. At this point the new link won't work anymore. This is cache issue in Turbo. To avoid it add a ramdom value as get parameter, microtime(true) will make it unique for one client:
185-
186-
```php
187-
return $this->redirectToRoute('school', ['rmd' => time()], Response::HTTP_SEE_OTHER);
188-
```
189-
and in the listing template:
190-
191-
```php
192-
<a data-turbo-action="replace" href="/school/new?rdm={{ rdm }}">Add Product</a>
193-
```
194181

195182
#### More Turbo Drive Info
196183

0 commit comments

Comments
 (0)