From 4f7579a5db581cd6c27886f0d349b2015932d83d Mon Sep 17 00:00:00 2001
From: danielvincent <danielgrippi@gmail.com>
Date: Thu, 1 Jul 2010 19:49:56 -0700
Subject: [PATCH] DG MS; fixed delete button bug on stream

---
 app/controllers/blogs_controller.rb           | 2 +-
 app/controllers/bookmarks_controller.rb       | 2 +-
 app/controllers/status_messages_controller.rb | 2 +-
 app/views/blogs/_blog.html.haml               | 2 +-
 app/views/bookmarks/_bookmark.html.haml       | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb
index 7ca1f2441f..27a5c86905 100644
--- a/app/controllers/blogs_controller.rb
+++ b/app/controllers/blogs_controller.rb
@@ -42,6 +42,6 @@ class BlogsController < ApplicationController
     @blog = Blog.where(:id => params[:id]).first
     @blog.destroy
     flash[:notice] = "Successfully destroyed blog."
-    redirect_to blogs_url
+    redirect_to root_url
   end
 end
diff --git a/app/controllers/bookmarks_controller.rb b/app/controllers/bookmarks_controller.rb
index bf3e54f08b..2f62d5cd35 100644
--- a/app/controllers/bookmarks_controller.rb
+++ b/app/controllers/bookmarks_controller.rb
@@ -43,6 +43,6 @@ class BookmarksController < ApplicationController
     @bookmark = Bookmark.first(:conditions => {:id => params[:id]})    
     @bookmark.destroy
     flash[:notice] = "Successfully destroyed bookmark."
-    redirect_to bookmarks_url
+    redirect_to root_url
   end
 end
diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb
index bec255e557..d4061d1240 100644
--- a/app/controllers/status_messages_controller.rb
+++ b/app/controllers/status_messages_controller.rb
@@ -33,7 +33,7 @@ class StatusMessagesController < ApplicationController
     @status_message = StatusMessage.where(:id => params[:id]).first
     @status_message.destroy
     flash[:notice] = "Successfully destroyed status message."
-    redirect_to status_messages_url
+    redirect_to root_url
   end
   
   def show
diff --git a/app/views/blogs/_blog.html.haml b/app/views/blogs/_blog.html.haml
index 34d53f226e..c4b0fc90bb 100644
--- a/app/views/blogs/_blog.html.haml
+++ b/app/views/blogs/_blog.html.haml
@@ -14,4 +14,4 @@
 
   - if mine?(post)
     .destroy_link
-      = link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
+      = link_to 'Delete', blog_path(post), :confirm => 'Are you sure?', :method => :delete
diff --git a/app/views/bookmarks/_bookmark.html.haml b/app/views/bookmarks/_bookmark.html.haml
index 953d13b0e3..4b5ab68651 100644
--- a/app/views/bookmarks/_bookmark.html.haml
+++ b/app/views/bookmarks/_bookmark.html.haml
@@ -15,4 +15,4 @@
 
   - if mine?(post)
     .destroy_link
-      = link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
+      = link_to 'Delete', bookmark_path(post), :confirm => 'Are you sure?', :method => :delete
-- 
GitLab