Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Created January 23, 2011 07:32
Show Gist options
  • Save michaeltwofish/791902 to your computer and use it in GitHub Desktop.
Save michaeltwofish/791902 to your computer and use it in GitHub Desktop.
public function edit() {
$item = Item::find('first');
if ($this->request->data) {
$data = array('confirmed' => true, 'token' => null);
if ($item && $item->save($data, array('validate' => false))) {
$this->redirect('Items::index');
}
} else {
return compact('item');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment