From e7771f8667ec8729aeed2e9e22f99509f4cb377f Mon Sep 17 00:00:00 2001 From: Parziphal Date: Sun, 1 Dec 2013 21:27:23 -0500 Subject: [PATCH] fixed error on redirection in update action --- app/controllers/AdvertisementsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/AdvertisementsController.php b/app/controllers/AdvertisementsController.php index c386615..d83322a 100755 --- a/app/controllers/AdvertisementsController.php +++ b/app/controllers/AdvertisementsController.php @@ -30,7 +30,7 @@ class AdvertisementsController extends ApplicationController $this->ad = new Advertisement($this->params()->advertisement); if ($this->ad->save()) { $this->notice('Advertisement added'); - $this->redirectTo(['#show', 'id' => $this->ad->id]); + $this->redirectTo($this->ad); } else { $this->render('blank'); } @@ -46,7 +46,7 @@ class AdvertisementsController extends ApplicationController $this->ad = Advertisement::find($this->params()->id); if ($this->ad->updateAttributes($this->params()->advertisement)) { $this->notice('Advertisement updated'); - $this->redirectTo(['#show', 'id' => $this->ad]); + $this->redirectTo($this->ad); } else { $this->render('blank'); }