@@ -14,7 +14,9 @@ class PrintingResource < ApplicationResource # rubocop:disable Metrics/ClassLeng
14
14
15
15
attribute :flavor , :string
16
16
attribute :display_illustrators , :string
17
- attribute :illustrator_ids , :array_of_strings
17
+ attribute :illustrator_ids , :array_of_strings do
18
+ @object . illustrator_ids_in_database
19
+ end
18
20
attribute :illustrator_names , :array_of_strings
19
21
20
22
attribute :position , :integer
@@ -53,12 +55,16 @@ class PrintingResource < ApplicationResource # rubocop:disable Metrics/ClassLeng
53
55
attribute :text , :string
54
56
attribute :trash_cost , :integer
55
57
attribute :is_unique , :boolean
56
- attribute :card_subtype_ids , :array_of_strings
58
+ attribute :card_subtype_ids , :array_of_strings do
59
+ @object . card_subtype_ids_in_database
60
+ end
57
61
attribute :card_subtype_names , :array_of_strings
58
62
attribute :display_subtypes , :string
59
63
attribute :attribution , :string
60
64
attribute :format_ids , :array_of_strings
61
- attribute :card_pool_ids , :array_of_strings
65
+ attribute :card_pool_ids , :array_of_strings do
66
+ @object . card_pool_ids_in_database
67
+ end
62
68
attribute :snapshot_ids , :array_of_strings
63
69
attribute :card_cycle_ids , :array_of_strings do
64
70
@object . card_cycle_ids_in_database
@@ -118,14 +124,14 @@ class PrintingResource < ApplicationResource # rubocop:disable Metrics/ClassLeng
118
124
many_to_many :card_subtypes do
119
125
link do |p |
120
126
format ( '%<url>s?filter[id]=%<ids>s' , url : Rails . application . routes . url_helpers . card_subtypes_url ,
121
- ids : p . card_subtype_ids . join ( ',' ) )
127
+ ids : p . card_subtype_ids_in_database . join ( ',' ) )
122
128
end
123
129
end
124
130
125
131
many_to_many :illustrators do
126
132
link do |p |
127
133
format ( '%<url>s?filter[id]=%<ids>s' , url : Rails . application . routes . url_helpers . illustrators_url ,
128
- ids : p . illustrator_ids . join ( ',' ) )
134
+ ids : p . illustrator_ids_in_database . join ( ',' ) )
129
135
end
130
136
end
131
137
0 commit comments