Method: Admin::Blog::CommentsController#rejected
- Defined in:
- app/controllers/admin/blog/comments_controller.rb
#rejected ⇒ Object
rejecting comments if there is a request to reject comment showing all rejected comments when params is not present
50 51 52 53 54 55 56 57 58 59 60 |
# File 'app/controllers/admin/blog/comments_controller.rb', line 50 def rejected unless params[:id].present? @blog_comments = BlogComment.rejected render :action => 'index' else @blog_comment = BlogComment.find(params[:id]) @blog_comment.reject! flash[:notice] = t('admin.blog.comments.rejected', :author => @blog_comment.name) redirect_to :action => params[:return_to] || 'index' end end |