Skip to content

Commit

Permalink
Fix up patch not being supported by edit in baked controllers.
Browse files Browse the repository at this point in the history
Fixes #4284
  • Loading branch information
markstory committed Aug 20, 2014
1 parent c77b351 commit d459aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Template/Bake/default/actions/controller_actions.ctp
Expand Up @@ -102,7 +102,7 @@ $allAssociations = array_merge(
$<?= $singularName ?> = $this-><?= $currentModelName ?>->get($id, [
'contain' => [<?= $stringifyList($belongsToMany) ?>]
]);
if ($this->request->is(['post', 'put'])) {
if ($this->request->is(['patch', 'post', 'put'])) {
$<?= $singularName ?> = $this-><?= $currentModelName ?>->patchEntity($<?= $singularName ?>, $this->request->data);
if ($this-><?= $currentModelName; ?>->save($<?= $singularName ?>)) {
$this->Flash->success('The <?= strtolower($singularHumanName); ?> has been saved.');
Expand Down

0 comments on commit d459aa7

Please sign in to comment.