Class: Panda::Core::FileCategory

Inherits:
ApplicationRecord show all
Defined in:
app/models/panda/core/file_category.rb

Instance Method Summary collapse

Instance Method Details

#all_blob_idsObject

Returns all blob IDs for this category and its children



26
27
28
29
# File 'app/models/panda/core/file_category.rb', line 26

def all_blob_ids
  category_ids = [id] + children.pluck(:id)
  Panda::Core::FileCategorization.where(file_category_id: category_ids).pluck(:blob_id)
end