no such method
parent
e404a9c1a9
commit
949aae1c02
|
@ -55,7 +55,7 @@ class Authors < Application
|
||||||
def delete
|
def delete
|
||||||
@author = Author.find_by_name(params[:id])
|
@author = Author.find_by_name(params[:id])
|
||||||
raise NotFound unless @author
|
raise NotFound unless @author
|
||||||
if @author.destroy!
|
if @author.destroy
|
||||||
flash[:notice] = 'The author was destroyed.'
|
flash[:notice] = 'The author was destroyed.'
|
||||||
if @author.id == session[:author_id]
|
if @author.id == session[:author_id]
|
||||||
redirect url(:delete_session, :id => session[:author_id])
|
redirect url(:delete_session, :id => session[:author_id])
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Comments < Application
|
||||||
@comment = Comment.find(params[:id])
|
@comment = Comment.find(params[:id])
|
||||||
raise NotFound unless @comment
|
raise NotFound unless @comment
|
||||||
@page = @comment.page
|
@page = @comment.page
|
||||||
if @comment.destroy!
|
if @comment.destroy
|
||||||
flash[:notice] = 'Comment was destroyed.'
|
flash[:notice] = 'Comment was destroyed.'
|
||||||
redirect url(:page, :id => @page.name.gsub(/ /, '_'))
|
redirect url(:page, :id => @page.name.gsub(/ /, '_'))
|
||||||
else
|
else
|
||||||
|
|
Reference in New Issue