Updating bake templates to let PUT methods through as well.

This commit is contained in:
mark_story 2010-12-14 22:09:29 -05:00
parent 19f9caed28
commit 75af48b774

View file

@ -72,7 +72,7 @@
if (!$this-><?php echo $currentModelName; ?>->exists()) {
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
}
if ($this->request->is('post')) {
if ($this->request->is('post') || $this->request->is('put')) {
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
<?php if ($wannaUseSession): ?>
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));