From 5df97d98dd8132edb9ff91891716a2a289e0bc8f Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Sun, 10 Nov 2024 15:50:10 +0100 Subject: [PATCH] wip --- lib/dump/snapshot.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dump/snapshot.rb b/lib/dump/snapshot.rb index 32f0039..46aef05 100644 --- a/lib/dump/snapshot.rb +++ b/lib/dump/snapshot.rb @@ -14,9 +14,9 @@ def self.list(options = {}) dumps = dumps.select{ |dump| dump.name[options[:like]] } if options[:like] if options[:tags] tags = get_filter_tags(options[:tags]) - dumps = dumps.select{ |dump| (dump.tags & tags[:simple]).present? } if tags[:simple].present? - dumps = dumps.select{ |dump| (dump.tags & tags[:mandatory]) == tags[:mandatory] } if tags[:mandatory].present? - dumps = dumps.reject{ |dump| (dump.tags & tags[:forbidden]).present? } if tags[:forbidden].present? + # dumps = dumps.select{ |dump| dump.tags.intersect?(tags[:simple]) } if tags[:simple].present? + # dumps = dumps.select{ |dump| dump.tags.superset?(tags[:mandatory]) } if tags[:mandatory].present? + # dumps = dumps.reject{ |dump| dump.tags.intersect?(tags[:forbidden]) } if tags[:forbidden].present? end dumps end