DG MS; fixed delete button bug on stream

This commit is contained in:
danielvincent 2010-07-01 19:49:56 -07:00
parent 2f23387b3a
commit 4f7579a5db
5 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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