Skip to content

Commit

Permalink
An array should be passed to allowMethod to allow multiple methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Berry Goudswaard committed Oct 16, 2014
1 parent c9ba7d0 commit 8a2b2c1
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 @@ -132,7 +132,7 @@ $allAssociations = array_merge(
*/
public function delete($id = null) {
$<?= $singularName ?> = $this-><?= $currentModelName ?>->get($id);
$this->request->allowMethod('post', 'delete');
$this->request->allowMethod(['post', 'delete']);
if ($this-><?= $currentModelName; ?>->delete($<?= $singularName ?>)) {
$this->Flash->success('The <?= strtolower($singularHumanName) ?> has been deleted.');
} else {
Expand Down

0 comments on commit 8a2b2c1

Please sign in to comment.