File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,14 @@ class Card < ApplicationRecord
10
10
has_many :card_pool_cards
11
11
has_many :card_pools , :through => :card_pool_cards
12
12
has_many :restriction_card_banned
13
- has_many :restrictions , :through => :restriction_card_banned
14
-
13
+ has_many :restriction_card_global_penalty
14
+ has_many :restriction_card_points , class_name : 'RestrictionCardPoints'
15
+ has_many :restriction_card_restricted
16
+ has_many :restriction_card_universal_faction_cost
17
+ # This is here to support restrictions, but isn't usable on it's own.
15
18
has_many :unified_restrictions
19
+ # Will be all restrictions that directly reference this card in any way.
20
+ has_many :restrictions , -> { where ( 'unified_restrictions.in_restriction' : true ) } , :through => :unified_restrictions
16
21
17
22
validates :name , uniqueness : true
18
23
You can’t perform that action at this time.
0 commit comments