Permalink
Browse files

bug #3615 Fixes to cookbook/doctrine/registration_form.rst (Crushnaut)

This PR was merged into the 2.3 branch.

Discussion
----------

Fixes to cookbook/doctrine/registration_form.rst

As I was working through this example I noticed a few issues. Firstly, no button to submit the registration form is ever specified. Secondly, in the accountController the Response object is included, but not needed. Thirdly, the Request object is required in the code block for the method createAction in the accountController.

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all (or 2.3+)
| Fixed tickets | none that I know of

Commits
-------

b56ab13 Made on additional fix as per previous pull request.
adffc6b Fixes to cookbook/doctrine/registration_form.rst
  • Loading branch information...
weaverryan committed Feb 27, 2014
2 parents 0928249 + b56ab13 commit adcbb5de6c3b8d6ba59e619315ef13fe45318494
Showing with 4 additions and 1 deletion.
  1. +4 −1 cookbook/doctrine/registration_form.rst
@@ -216,6 +216,7 @@ Next, create the form for this ``Registration`` model::
'checkbox',
array('property_path' => 'termsAccepted')
);
$builder->add('Register', 'submit');
}
public function getName()
@@ -239,7 +240,6 @@ controller for displaying the registration form::
namespace Acme\AccountBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Acme\AccountBundle\Form\Type\RegistrationType;
use Acme\AccountBundle\Form\Model\Registration;
@@ -270,6 +270,9 @@ And its template:
Next, create the controller which handles the form submission. This performs
the validation and saves the data into the database::
use Symfony\Component\HttpFoundation\Request;
// ...
public function createAction(Request $request)
{
$em = $this->getDoctrine()->getManager();

0 comments on commit adcbb5d

Please sign in to comment.