Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
  def destroy_multiple
    @contents = PublishedContent.find(params[:id])

    @contents.each do |content|
      unless content.unpublish
        fail[:notice] = "Failed to remove content"
        redirect_to admin_contents_path
      end
    end

    redirect_to admin_contents_path
    flash[:notice] = "Content successfully Removed"
  end