diff --git a/app/controllers/authors.rb b/app/controllers/authors.rb index dda05a3..2c993cf 100644 --- a/app/controllers/authors.rb +++ b/app/controllers/authors.rb @@ -55,7 +55,7 @@ class Authors < Application def delete @author = Author.find_by_name(params[:id]) raise NotFound unless @author - if @author.destroy! + if @author.destroy flash[:notice] = 'The author was destroyed.' if @author.id == session[:author_id] redirect url(:delete_session, :id => session[:author_id]) diff --git a/app/controllers/comments.rb b/app/controllers/comments.rb index 56d6f71..33b92d9 100644 --- a/app/controllers/comments.rb +++ b/app/controllers/comments.rb @@ -24,7 +24,7 @@ class Comments < Application @comment = Comment.find(params[:id]) raise NotFound unless @comment @page = @comment.page - if @comment.destroy! + if @comment.destroy flash[:notice] = 'Comment was destroyed.' redirect url(:page, :id => @page.name.gsub(/ /, '_')) else