Skip to content

Commit 73866f2

Browse files
committed
minor #9539 Update controller.rst (zairigimad)
This PR was submitted for the 4.0 branch but it was merged into the 2.7 branch instead (closes #9539). Discussion ---------- Update controller.rst change the variable name to make it consistent with the example <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- 6b738c9 Update controller.rst
2 parents b7224c4 + 6b738c9 commit 73866f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controller.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ method renders a template **and** puts that content into a ``Response``
218218
object for you::
219219

220220
// renders app/Resources/views/lucky/number.html.twig
221-
return $this->render('lucky/number.html.twig', array('name' => $name));
221+
return $this->render('lucky/number.html.twig', array('number' => $number));
222222

223223
Templates can also live in deeper sub-directories. Just try to avoid
224224
creating unnecessarily deep structures::
225225

226226
// renders app/Resources/views/lottery/lucky/number.html.twig
227227
return $this->render('lottery/lucky/number.html.twig', array(
228-
'name' => $name,
228+
'number' => $number,
229229
));
230230

231231
The Symfony templating system and Twig are explained more in the

0 commit comments

Comments
 (0)