def destroy_all
      if defined?(ActiveRecord)
        if params[:app]
          RailsExceptionHandler::ActiveRecord::ErrorMessage.destroy_all(app_name: params[:app])
        else
          RailsExceptionHandler::ActiveRecord::ErrorMessage.destroy_all
        end
      end
      if defined?(Mongoid)
        if params[:app]
          RailsExceptionHandler::Mongoid::ErrorMessage.where(app_name: params[:app]).destroy
        else
          RailsExceptionHandler::Mongoid::ErrorMessage.all.destroy
        end
      end

      respond_to do |format|
        format.html { redirect_to error_messages_url }
        format.json { head :no_content }
      end
    end
def destroy_all
      if defined?(ActiveRecord)
        if params[:app]
          RailsExceptionHandler::ActiveRecord::ErrorMessage.destroy_all(app_name: params[:app])
        else
          RailsExceptionHandler::ActiveRecord::ErrorMessage.destroy_all
        end
      end
      if defined?(Mongoid)
        if params[:app]
          RailsExceptionHandler::Mongoid::ErrorMessage.where(app_name: params[:app]).destroy
        else
          RailsExceptionHandler::Mongoid::ErrorMessage.all.destroy
        end
      end

      respond_to do |format|
        format.html { redirect_to error_messages_url }
        format.json { head :no_content }
      end
    end
DELETE /error_messages
 DELETE /error_messages.json