Form bind method should take request as argument

This commit is contained in:
Paweł Jędrzejewski 2012-11-04 21:28:43 +01:00
parent 1dd10d0ac6
commit 4293e37e26

View file

@ -85,7 +85,7 @@ abstract class ResourceController extends Controller implements ResourceControll
$resource = $this->createResource(); $resource = $this->createResource();
$form = $this->createResourceForm($resource); $form = $this->createResourceForm($resource);
if ($request->isMethod('POST') && $form->bind()->isValid()) { if ($request->isMethod('POST') && $form->bind($request)->isValid()) {
$this->getManipulator()->create($resource); $this->getManipulator()->create($resource);
$this->setFlash('success', sprintf("%s has been created", ucfirst($this->getResourceName()))); $this->setFlash('success', sprintf("%s has been created", ucfirst($this->getResourceName())));