no such method
parent
e404a9c1a9
commit
949aae1c02
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue