You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: notifications_controller.rb
    path of file: ./repos/ekylibre/app/controllers/backend
    
    the code of the file until where you have to start completion: # == License
# Ekylibre - Simple agricultural ERP
# Copyright (C) 2008-2011
    
    def destroy
      if params[:id]
        notification = find_and_check
        return unless notification

        notification.read!
      else
        current_user.unread_notifications.find_each(&:read!)
      end