I have a view which interacts with more than one controller (post, comments, categories...)
In case the comment is not empty, it would go to the same action (comments/add) but in this case i manually redirect them again to the previous view with something like this:
$this->redirect(array('controller' => 'posts', 'action' => 'view', $this->request->data['Comment']['posts_id'], '#' => $this->Comment->id));
The thing is, when they try to post an empty comment, for example, the validation of Comment redirects it to comments/add (which is the route on the form action) but i don't want the redirection to do this. I want it to come back to the original view and i don't have anyway to change it on the controller or the model (as far as I know)
Is there any way to do this?
Thanks.