On Wed, Apr 30, 2008 at 11:53 AM, avairet <[EMAIL PROTECTED]> wrote:
>
>
>  In fact, in my Model::afterSave, I do a "move_uploaded_file()" and if
>  this move doesn't work, I would like to redirect in the previous
>  controller action instead of the redirect(index)

You cannot redirect from inside a model, like Clark said.  You must
get your model to return some value to the controller that you can use
to determine if you need to redirect or not.

Again, this comes with understanding both Cake's conventions and
understanding how Cake's MVC implementation works.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to