def destroy_all_deleted
      @posts = LatoBlog::Post.deleted

      if !@posts || @posts.empty?
        flash[:warning] = LANGUAGES[:lato_blog][:flashes][:deleted_posts_not_found]
        redirect_to lato_blog.posts_path(status: 'deleted')
        return
      end

      @posts.each do |post|
        unless post.destroy
          flash[:danger] = post.errors.full_messages.to_sentence
          redirect_to lato_blog.edit_post_path(post.id)
          return
        end
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:deleted_posts_destroy_success]
      redirect_to lato_blog.posts_path(status: 'deleted')
    end
def destroy_all_deleted
      @posts = LatoBlog::Post.deleted

      if !@posts || @posts.empty?
        flash[:warning] = LANGUAGES[:lato_blog][:flashes][:deleted_posts_not_found]
        redirect_to lato_blog.posts_path(status: 'deleted')
        return
      end

      @posts.each do |post|
        unless post.destroy
          flash[:danger] = post.errors.full_messages.to_sentence
          redirect_to lato_blog.edit_post_path(post.id)
          return
        end
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:deleted_posts_destroy_success]
      redirect_to lato_blog.posts_path(status: 'deleted')
    end
Tis function destroyes all posts with status deleted.