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: app.rb
    path of file: ./repos/zealot/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class App < ApplicationRecord
  default_scope { order(id: :asc) }

  has_and_belongs_to_many :users
  has_many :schemes, dependent: :destroy
  has_many :debug_files, dependent: :dest
    
  def all_idenfiters(device_type: nil)
    schemes.all.each_with_object({}) do |scheme, obj|
      channels = scheme.channels
      channels = device_type ? channels.where(device_type: device_type) : channels.all
      channels.each do |channel|
        device_type = channel.device_type.to_sym
        obj[device_type] ||= []
        channel.releases.select(:bundle_id).distinct.each do |release|
          next if obj[device_type].include?(release.bundle_id)

          obj[device_type] << release.bundle_id
        end
      end
    end
  end