# frozen_string_literal: true module Care::AutoFinder # # Содержит методы для фильтрации по ids # # @example # class Finder # include ByIds # # attr_accessor :params # # def call # params = { ids: [1, 2, 3] } # by_ids(Document) # end # end # module ByIds def ids(items) params[:ids].present? ? items.where(id: params[:ids]) : items end end end