We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c600632 commit b03be7cCopy full SHA for b03be7c
app/resources/decklist_resource.rb
@@ -36,6 +36,15 @@ class DecklistResource < ApplicationResource
36
end
37
38
39
+ # Will return decklists that do NOT contain any of the specified cards.
40
+ filter :exclude_card_id, :string do
41
+ eq do |scope, card_ids|
42
+ scope.left_joins(:decklist_cards)
43
+ .group('decklists.id')
44
+ .having('COUNT(CASE WHEN decklists_cards.card_id IN (?) THEN 1 END) = 0', card_ids)
45
+ end
46
47
+
48
attribute :card_slots, :hash
49
attribute :num_cards, :integer
50
attribute :influence_spent, :integer
0 commit comments