Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function edit($id = null){
- if(!$id){
- $this->Session->setFlash('Tarea invalida');
- $this->redirect(array('action'=>'index'),null,true);
- }
- if(empty($this->data)){
- $this->data = $this->Tarea->find(array('id'=>$id));
- }else{
- if($this->Tarea->save($this->data)){
- $this->Session->setFlash('La tarea ha sido salvada');
- $this->redirect(array('action'=>'index'),null,true);
- }else{
- $this->Session->setFlash('La tarea no ha podido ser salvada. Intentelo de nuevo');
- }
- }
- }
Add Comment
Please, Sign In to add comment