File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
75
75
unless @object . num_extra_faces . zero?
76
76
@object . face_indices . each do |index |
77
77
f = { index :,
78
- images : images ( @object . latest_printing_id , @object . printings . last . xlarge_image? , face_index : index ) }
78
+ images : images ( @object . latest_printing_id ,
79
+ @object . printings . order ( :date_release ) . reverse_order . first . xlarge_image? ,
80
+ face_index : index ) }
79
81
f [ :base_link ] = @object . faces_base_link [ index ] if @object . faces_base_link [ index ]
80
82
f [ :display_subtypes ] = @object . faces_display_subtypes [ index ] if @object . faces_display_subtypes [ index ]
81
83
f [ :card_subtype_ids ] = @object . faces_card_subtype_ids [ index ] . compact if @object . faces_card_subtype_ids [ index ]
@@ -94,7 +96,7 @@ class CardResource < ApplicationResource # rubocop:disable Metrics/ClassLength
94
96
attribute :restrictions , :hash
95
97
attribute :latest_printing_id , :string
96
98
attribute :latest_printing_images , :hash do
97
- images ( @object . latest_printing_id , @object . printings . last . xlarge_image? ,
99
+ images ( @object . latest_printing_id , @object . printings . order ( :date_release ) . reverse_order . first . xlarge_image? ,
98
100
has_narrative_image : @object . narrative_text . present? )
99
101
end
100
102
You can’t perform that action at this time.
0 commit comments